Translator: Also adjust env var `LANGUAGE` when setting up the locale

fixes #3750
This commit is contained in:
Johannes Meyer 2019-05-10 12:21:40 +02:00
parent ef470b3c1d
commit 4af672fdfa
1 changed files with 3 additions and 0 deletions

View File

@ -187,6 +187,9 @@ class Translator
$locale = setlocale(LC_ALL, 0);
putenv('LC_ALL=' . $locale); // Failsafe, Win and Unix
putenv('LANG=' . $locale); // Windows fix, untested
// https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
putenv('LANGUAGE=' . $localeName . ':' . getenv('LANGUAGE'));
}
}