Fix language when no custom files exist
This commit is contained in:
parent
60b462465e
commit
c376f8b5b0
@ -36,6 +36,7 @@ class Translate {
|
|||||||
$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';
|
||||||
}
|
}
|
||||||
$this->lang = parse_ini_file($langFile);
|
$this->lang = parse_ini_file($langFile);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user