From 308f0778ed394ea02bea050c6a52c1bf158a63df Mon Sep 17 00:00:00 2001 From: Niklas Poslovski Date: Tue, 2 Oct 2018 18:17:02 +0000 Subject: [PATCH] Minor fix --- language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language.php b/language.php index dc75f33..cc4849d 100644 --- a/language.php +++ b/language.php @@ -4,7 +4,7 @@ $locale = ''; if(isset($_COOKIE['language'])) $locale = $_COOKIE['language']; else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $langcode = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); -if(file_exists(__DIR__.'/locale/'.$langcode)) $locale = langcode; +if(file_exists(__DIR__.'/locale/'.$langcode)) $locale = $langcode; else if(file_exists(__DIR__.'/locale/'.explode("_",$langcode)[0])) $locale = explode("_",$langcode)[0]; else $locale = $config['App']['default_language']; }