Penguin
Blame: textdomain(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of textdomain(3) version 4, including all changes. View license author blame.
Rev Author # Line
1 perry 1 TEXTDOMAIN
2 !!!TEXTDOMAIN
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 BUGS
9 SEE ALSO
10 ----
11 !!NAME
12
13
14 textdomain - set domain for future gettext() calls
15 !!SYNOPSIS
16
17
18 __#include
19 __ ''domainname''__);
20 __
21 !!DESCRIPTION
22
23
24 The __textdomain__ function sets or retrieves the current
25 message domain.
26
27
28 A message domain is a set of translatable ''msgid''
29 messages. Usually, every software package has its own
30 message domain. The domain name is used to determine the
31 message catalog where a translation is looked up; it must be
32 a non-empty string.
33
34
35 The current message domain is used by the __gettext__,
36 __ngettext__ functions, and by the __dgettext__,
37 __dcgettext__, __dngettext__ and __dcngettext__
38 functions when called with a NULL domainname
39 argument.
40
41
42 If ''domainname'' is not NULL, the current message domain
43 is set to ''domainname''. The string the function stores
44 internally is a copy of the ''domainname''
45 argument.
46
47
48 If ''domainname'' is NULL, the function returns the
49 current message domain.
50 !!RETURN VALUE
51
52
53 If successful, the __textdomain__ function returns the
54 current message domain, after possibly changing it. The
55 resulting string is valid until the next __textdomain__
56 call and must not be modified or freed. If a memory
57 allocation failure occurs, it sets __errno__ to
58 __ENOMEM__ and returns NULL.
59 !!ERRORS
60
61
62 The following error can occur, among others:
63
64
65 __ENOMEM__
66
67
68 Not enough memory available.
69 !!BUGS
70
71
72 The return type ought to be __const char *__, but is
73 __char *__ to avoid warnings in C code predating ANSI
74 C.
75 !!SEE ALSO
76
77
78 gettext(3), ngettext(3),
79 bindtextdomain(3),
4 perry 80 bind_textdomain_codeset(3)
1 perry 81 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.