1 #ifdef GETTEXT_DEFINES_GET_PREFERRED_LANGUAGES
3 /* From the original gettext.c file after the Add Accept-Language patch added */
5 const char *get_preferred_languages(void);
8 * Guess the user's preferred languages from the value in LANGUAGE environment
9 * variable and LC_MESSAGES locale category if NO_GETTEXT is not defined.
11 * The result can be a colon-separated list like "ko:ja:en".
13 const char *get_preferred_languages(void)
17 retval
= getenv("LANGUAGE");
18 if (retval
&& *retval
)
22 retval
= setlocale(LC_MESSAGES
, NULL
);
23 if (retval
&& *retval
&&
24 strcmp(retval
, "C") &&
25 strcmp(retval
, "POSIX"))
32 #endif /* GETTEXT_DEFINES_GET_PREFERRED_LANGUAGES */