Penguin
Blame: bindtextdomain(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of bindtextdomain(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 BINDTEXTDOMAIN
2 !!!BINDTEXTDOMAIN
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 BUGS
9 SEE ALSO
10 ----
11 !!NAME
12
13
14 bindtextdomain - set directory containing message catalogs
15 !!SYNOPSIS
16
17
18 __#include
19 __ ''domainname''__, const char *__ ''dirname''__);
20 __
21 !!DESCRIPTION
22
23
24 The __bindtextdomain__ function sets the base directory
25 of the hierarchy containing message catalogs for a given
26 message domain.
27
28
29 A message domain is a set of translatable ''msgid''
30 messages. Usually, every software package has its own
31 message domain. The need for calling __bindtextdomain__
32 arises because packages are not always installed with the
33 same prefix as the
34 __
35
36
37 Message catalogs will be expected at the pathnames
38 ''dirname''/''locale''/''category''/''domainname''.mo,
39 where ''locale'' is a locale name and ''category'' is
40 a locale facet such as __LC_MESSAGES__.
41
42
43 ''domainname'' must be a non-empty string.
44
45
46 If ''dirname'' is not NULL, the base directory for
47 message catalogs belonging to domain ''domainname'' is
48 set to ''dirname''. The function makes copies of the
49 argument strings as needed. If the program wishes to call
50 the __chdir__ function, it is important that
51 ''dirname'' be an absolute pathname; otherwise it cannot
52 be guaranteed that the message catalogs will be
53 found.
54
55
56 If ''dirname'' is NULL, the function returns the
57 previously set base directory for domain
58 ''domainname''.
59 !!RETURN VALUE
60
61
62 If successful, the __bindtextdomain__ function returns
63 the current base directory for domain ''domainname'',
64 after possibly changing it. The resulting string is valid
65 until the next __bindtextdomain__ call for the same
66 ''domainname'' and must not be modified or freed. If a
67 memory allocation failure occurs, it sets __errno__ to
68 __ENOMEM__ and returns NULL.
69 !!ERRORS
70
71
72 The following error can occur, among others:
73
74
75 __ENOMEM__
76
77
78 Not enough memory available.
79 !!BUGS
80
81
82 The return type ought to be __const char *__, but is
83 __char *__ to avoid warnings in C code predating ANSI
84 C.
85 !!SEE ALSO
86
87
88 gettext(3), dgettext(3), dcgettext(3),
89 ngettext(3), dngettext(3),
90 dcngettext(3), textdomain(3),
91 realpath(3)
92 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.