Fix language when no custom files exist - again - thanks ide
This commit is contained in:
@@ -35,7 +35,7 @@ class Translate {
|
|||||||
//construct lang file
|
//construct lang file
|
||||||
$langFile = Registry::DIRPATH . 'src/Language/'. $this->UserLng . '.lang.ini';
|
$langFile = Registry::DIRPATH . 'src/Language/'. $this->UserLng . '.lang.ini';
|
||||||
if(!file_exists($langFile)){
|
if(!file_exists($langFile)){
|
||||||
throw new \Exception("Language could not be loaded"); //or default to a language
|
//throw new \Exception("Language could not be loaded"); //or default to a language
|
||||||
$langFile = Registry::DIRPATH . 'src/Language/'. $this->UserLng . '.lang.ini.example';
|
$langFile = Registry::DIRPATH . 'src/Language/'. $this->UserLng . '.lang.ini.example';
|
||||||
}
|
}
|
||||||
$this->lang = parse_ini_file($langFile);
|
$this->lang = parse_ini_file($langFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user