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:
Johannes Meyer 2019-05-22 12:45:33 +02:00 committed by GitHub
commit de82dbe2ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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'));
}
}