Merge pull request #3778 from Icinga/fix/browser-language-not-used-3750
Also adjust env var `LANGUAGE` when setting up the locale
This commit is contained in:
commit
de82dbe2ab
|
@ -187,6 +187,9 @@ class Translator
|
||||||
$locale = setlocale(LC_ALL, 0);
|
$locale = setlocale(LC_ALL, 0);
|
||||||
putenv('LC_ALL=' . $locale); // Failsafe, Win and Unix
|
putenv('LC_ALL=' . $locale); // Failsafe, Win and Unix
|
||||||
putenv('LANG=' . $locale); // Windows fix, untested
|
putenv('LANG=' . $locale); // Windows fix, untested
|
||||||
|
|
||||||
|
// https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
|
||||||
|
putenv('LANGUAGE=' . $localeName . ':' . getenv('LANGUAGE'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue