Fix language when no custom files exist - again - thanks ide

This commit is contained in:
Josh North 2021-04-15 02:51:51 -04:00
parent c376f8b5b0
commit c71ecadd9d

View File

@ -35,7 +35,7 @@ class Translate {
//construct lang file
$langFile = Registry::DIRPATH . 'src/Language/'. $this->UserLng . '.lang.ini';
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);