1TEXTDOMAIN(3)              Library Functions Manual              TEXTDOMAIN(3)
2
3
4

NAME

6       textdomain - set domain for future gettext() calls
7

SYNOPSIS

9       #include <libintl.h>
10
11       char * textdomain (const char * domainname);
12

DESCRIPTION

14       The textdomain function sets or retrieves the current message domain.
15
16       A  message  domain  is  a  set of translatable msgid messages. Usually,
17       every software package has its own message domain. The domain  name  is
18       used to determine the message catalog where a translation is looked up;
19       it must be a non-empty string.
20
21       The current message domain is used by the gettext, ngettext  functions,
22       and by the dgettext, dcgettext, dngettext and dcngettext functions when
23       called with a NULL domainname argument.
24
25       If domainname is not NULL, the current message domain is set to domain‐
26       name.  The  string  the  function  stores  internally  is a copy of the
27       domainname argument.
28
29       If domainname is NULL, the function returns the current message domain.
30

RETURN VALUE

32       If successful, the textdomain  function  returns  the  current  message
33       domain, after possibly changing it. The resulting string is valid until
34       the next textdomain call and must not be modified or freed. If a memory
35       allocation failure occurs, it sets errno to ENOMEM and returns NULL.
36

ERRORS

38       The following error can occur, among others:
39
40       ENOMEM Not enough memory available.
41

BUGS

43       The  return type ought to be const char *, but is char * to avoid warn‐
44       ings in C code predating ANSI C.
45

SEE ALSO

47       gettext(3), ngettext(3), bindtextdomain(3), bind_textdomain_codeset(3)
48
49
50
51GNU gettext 0.19.8.1               May 2001                      TEXTDOMAIN(3)
Impressum