23 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS)
26 #define NO_NLS_UNUSED UNUSED
31 static int initialized;
36 setlocale(LC_CTYPE,
"");
38 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS)
40 setlocale(LC_MESSAGES,
"");
42 const char *gisbase = getenv(
"GISBASE");
44 if (gisbase && *gisbase) {
47 strcpy(localedir, gisbase);
48 strcat(localedir,
"/locale");
50 bindtextdomain(
"grasslibs", localedir);
51 bindtextdomain(
"grassmods", localedir);
68 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS)
71 return dgettext(package, msgid);
88 const char *msgidp,
unsigned long int n)
90 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS)
93 return dngettext(package, msgids, msgidp, n);
95 return n == 1 ? (
char *)msgids : (
char *)msgidp;
int G_is_initialized(int *)
void G_initialize_done(int *)
char * G_ngettext(const char *package NO_NLS_UNUSED, const char *msgids, const char *msgidp, unsigned long int n)
Gets localized text with correct plural forms.
char * G_gettext(const char *package NO_NLS_UNUSED, const char *msgid)
Gets localized text.