26 static int initialized;
32 setlocale(LC_CTYPE,
"");
34 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 36 setlocale(LC_MESSAGES,
"");
39 gisbase =
getenv(
"GISBASE");
40 if (gisbase && *gisbase) {
43 strcpy(localedir, gisbase);
44 strcat(localedir,
"/locale");
46 bindtextdomain(
"grasslibs", localedir);
47 bindtextdomain(
"grassmods", localedir);
63 char *
G_gettext(
const char *package,
const char *msgid)
65 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 68 return dgettext(package, msgid);
84 char *
G_ngettext(
const char *package,
const char *msgids,
const char *msgidp,
unsigned long int n)
86 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 89 return dngettext(package, msgids, msgidp, n);
91 return n == 1 ? (
char *)msgids : (
char *)msgidp;
char * G_gettext(const char *package, const char *msgid)
Gets localized text.
char * G_ngettext(const char *package, const char *msgids, const char *msgidp, unsigned long int n)
Gets localized text with correct plural forms.
void G_initialize_done(int *)
int G_is_initialized(int *)