1 /* Message catalogs for internationalization.
2 Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 /* Never include system <libintl.h> */
23 #ifndef EL__INTL_GETTEXT_LIBGNUINTL_H
24 #define EL__INTL_GETTEXT_LIBGNUINTL_H 1
29 #define LC_MESSAGES 1729
32 /* We define an additional symbol to signal that we use the GNU
33 implementation of gettext. */
34 #define __USE_GNU_GETTEXT 1
36 /* Resolve a platform specific conflict on DJGPP. GNU gettext takes
37 precedence over _conio_gettext. */
40 #define gettext gettext
47 /* Look up MSGID in the current default message catalog for the current
48 LC_MESSAGES locale. If not found, returns MSGID itself (the default
50 extern unsigned char *gettext(const unsigned char *__msgid
);
52 /* Look up MSGID in the DOMAINNAME message catalog for the current
53 LC_MESSAGES locale. */
54 extern unsigned char *dgettext(const unsigned char *__domainname
, const unsigned char *__msgid
);
56 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
58 extern unsigned char *dcgettext(const unsigned char *__domainname
, const unsigned char *__msgid
,
61 /* Similar to `gettext' but select the plural form corresponding to the
63 extern unsigned char *ngettext(const unsigned char *__msgid1
, const unsigned char *__msgid2
,
64 unsigned long int __n
);
66 /* Similar to `dgettext' but select the plural form corresponding to the
68 extern unsigned char *dngettext(const unsigned char *__domainname
, const unsigned char *__msgid1
,
69 const unsigned char *__msgid2
, unsigned long int __n
);
71 /* Similar to `dcgettext' but select the plural form corresponding to the
73 extern unsigned char *dcngettext(const unsigned char *__domainname
, const unsigned char *__msgid1
,
74 const unsigned char *__msgid2
, unsigned long int __n
,
77 /* Set the current default message catalog to DOMAINNAME.
78 If DOMAINNAME is null, return the current default.
79 If DOMAINNAME is "", reset to the default of "messages". */
80 extern unsigned char *textdomain(const unsigned char *__domainname
);
82 /* Specify that the DOMAINNAME message catalog will be found
83 in DIRNAME rather than in the system locale data base. */
84 extern unsigned char *bindtextdomain(const unsigned char *__domainname
,
85 const unsigned char *__dirname
);
87 /* Specify the character encoding in which the messages from the
88 DOMAINNAME message catalog will be returned. */
89 extern unsigned char *bind_textdomain_codeset(const unsigned char *__domainname
,
90 const unsigned char *__codeset
);
92 /* Optimized version of the functions above. */
93 #if defined __OPTIMIZED
94 /* These are macros, but could also be inline functions. */
96 #define gettext(msgid) \
99 #define dgettext(domainname, msgid) \
100 dcgettext(domainname, msgid, LC_MESSAGES)
102 #define ngettext(msgid1, msgid2, n) \
103 dngettext(NULL, msgid1, msgid2, n)
105 #define dngettext(domainname, msgid1, msgid2, n) \
106 dcngettext(domainname, msgid1, msgid2, n, LC_MESSAGES)
108 #endif /* Optimizing. */
113 #endif /* libintl.h */