Merge branch 'master' of tsia/halcyon into master

This commit is contained in:
Niklas Poslovski 2018-08-04 14:37:56 +00:00 committed by Gogs
commit 245f64d4c4
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ $locale = '';
if(isset($_COOKIE['language'])) $locale = $_COOKIE['language'];
else {
$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'];
}