forked from enlightenment/enlightenment
Don't modify users env if the user already has LANG
SVN revision: 14192
This commit is contained in:
parent
2538f96da8
commit
b34711e5e3
|
@ -60,14 +60,14 @@ e_intl_shutdown(void)
|
|||
void
|
||||
e_intl_language_set(const char *lang)
|
||||
{
|
||||
char buf[4096];
|
||||
|
||||
if (_e_intl_language) free(_e_intl_language);
|
||||
if (!lang) lang = getenv("LANG");
|
||||
if (!lang) lang = "en";
|
||||
if (!lang)
|
||||
{
|
||||
setenv("LANG", "en", 1);
|
||||
lang = "en";
|
||||
}
|
||||
_e_intl_language = strdup(lang);
|
||||
snprintf(buf, sizeof(buf), "LANG=%s", _e_intl_language);
|
||||
putenv(buf);
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALE_DIR);
|
||||
textdomain(PACKAGE);
|
||||
|
|
Loading…
Reference in New Issue