1 /* Copyright (C) 2003 Manuel Novoa III
2 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 * Stub version of libintl.
11 * Add some hidden names to support locale-enabled libstd++.
21 /**********************************************************************/
24 char *gettext(const char *msgid
)
26 return (char *) msgid
;
30 /**********************************************************************/
33 char *dgettext(const char *domainname
,
36 return (char *) msgid
;
40 /**********************************************************************/
43 char *dcgettext(const char *domainname
,
44 const char *msgid
, int category
)
46 return (char *) msgid
;
50 /**********************************************************************/
53 char *ngettext(const char *msgid1
, const char *msgid2
,
56 return (char *) ((n
== 1) ? msgid1
: msgid2
);
60 /**********************************************************************/
63 char *dngettext(const char *domainname
, const char *msgid1
,
64 const char *msgid2
, unsigned long int n
)
66 return (char *) ((n
== 1) ? msgid1
: msgid2
);
70 /**********************************************************************/
73 char *dcngettext(const char *domainname
, const char *msgid1
,
74 const char *msgid2
, unsigned long int n
,
77 return (char *) ((n
== 1) ? msgid1
: msgid2
);
81 /**********************************************************************/
84 char *textdomain(const char *domainname
)
86 static const char default_str
[] = "messages";
88 if (domainname
&& *domainname
&& strcmp(domainname
, default_str
)) {
92 return (char *) default_str
;
96 /**********************************************************************/
97 #ifdef L_bindtextdomain
99 char *bindtextdomain(const char *domainname
, const char *dirname
)
101 static const char dir
[] = "/";
103 if (!domainname
|| !*domainname
106 && ((dirname
[0] != '/') || dirname
[1])
108 && strcmp(dirname
, dir
)
120 /**********************************************************************/
121 #ifdef L_bind_textdomain_codeset
123 /* Specify the character encoding in which the messages from the
124 DOMAINNAME message catalog will be returned. */
125 char *bind_textdomain_codeset(const char *domainname
, const char *codeset
)
127 if (!domainname
|| !*domainname
|| codeset
) {
134 /**********************************************************************/
135 #ifdef L__nl_expand_alias
139 const char *_nl_expand_alias(const char * name
);
140 const char *_nl_expand_alias(const char * name
)
142 return NULL
; /* uClibc does not support locale aliases. */
146 /**********************************************************************/
147 #ifdef L__nl_msg_cat_cntr
151 int _nl_msg_cat_cntr
= 0;
154 /**********************************************************************/