language: Fallback to de-de instead of failing
This commit is contained in:
@@ -5,7 +5,8 @@ if(isset($_GET['lang'])){
|
|||||||
}
|
}
|
||||||
$lang_file = dirname(__FILE__) . "/lang/lang.".$lang.".php";
|
$lang_file = dirname(__FILE__) . "/lang/lang.".$lang.".php";
|
||||||
if (!file_exists($lang_file)) {
|
if (!file_exists($lang_file)) {
|
||||||
throw new Exception("Translation for " . $lang . " not found");
|
error_log("Translation for " . $lang . " not found. Fallback to 'de-de'");
|
||||||
|
$lang = "de-de";
|
||||||
}
|
}
|
||||||
require_once($lang_file);
|
require_once($lang_file);
|
||||||
unset($lang_file);
|
unset($lang_file);
|
||||||
|
|||||||
Reference in New Issue
Block a user