26 static int initialized;
31 setlocale(LC_CTYPE,
"");
33 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 35 setlocale(LC_MESSAGES,
"");
37 const char *gisbase =
getenv(
"GISBASE");
38 if (gisbase && *gisbase) {
41 strcpy(localedir, gisbase);
42 strcat(localedir,
"/locale");
44 bindtextdomain(
"grasslibs", localedir);
45 bindtextdomain(
"grassmods", localedir);
61 char *
G_gettext(
const char *package,
const char *msgid)
63 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 66 return dgettext(package, msgid);
82 char *
G_ngettext(
const char *package,
const char *msgids,
const char *msgidp,
unsigned long int n)
84 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS) 87 return dngettext(package, msgids, msgidp, n);
89 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 *)