First implementation #1
@@ -3,7 +3,7 @@ $lang = "de-de";
|
|||||||
if(isset($_GET['lang'])){
|
if(isset($_GET['lang'])){
|
||||||
$lang = filter_var($_GET['lang'], FILTER_SANITIZE_STRING);
|
$lang = filter_var($_GET['lang'], FILTER_SANITIZE_STRING);
|
||||||
}
|
}
|
||||||
$lang_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");
|
throw new Exception("Translation for " . $lang . " not found");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user