remove abort(); change lang-def de => de-de; cleanup

This commit is contained in:
2018-02-27 10:31:51 +01:00
parent 83cf11149b
commit 40b6970c1c
5 changed files with 9 additions and 21 deletions

View File

@@ -1,7 +1,12 @@
<?php
$lang = "de";
$lang = "de-de";
if(isset($_GET['lang'])){
$lang = $_GET['lang'];
$lang = filter_var($_GET['lang'], FILTER_SANITIZE_STRING);
}
require_once("lang/lang.".$lang.".php");
$lang_file = "lang/lang.".$lang.".php";
if (!file_exists($lang_file)) {
throw new Exception("Translation for " . $lang . " not found");
}
require_once($lang_file);
unset($lang_file);
?>