Merge pull request #3355 from Hypolite/issue/fix-language-guess

Skip lang file search if lang=en
This commit is contained in:
Michael Vogel 2017-04-19 16:24:30 +02:00 committed by GitHub
commit d95acdeab8

View file

@ -44,7 +44,7 @@ function get_browser_language() {
// check if we have translations for the preferred languages and pick the 1st that has
for ($i=0; $i<count($lang_list); $i++) {
$lang = $lang_list[$i];
if(file_exists("view/lang/$lang") && is_dir("view/lang/$lang")) {
if ($lang === 'en' || (file_exists("view/lang/$lang") && is_dir("view/lang/$lang"))) {
$preferred = $lang;
break;
}