forked from kevinowino869/mitrobill
Language editor
This commit is contained in:
@ -11,11 +11,12 @@ class Lang
|
||||
public static function T($key)
|
||||
{
|
||||
global $_L, $lan_file, $config;
|
||||
$L = $_SESSION['Lang'];
|
||||
$_L = $_SESSION['Lang'];
|
||||
if (!empty($_L[$key])) {
|
||||
return $_L[$key];
|
||||
}
|
||||
$val = $key;
|
||||
$key = Lang::sanitize($key);
|
||||
if (isset($_L[$key])) {
|
||||
return $_L[$key];
|
||||
}else if (isset($_L[$key])) {
|
||||
@ -38,6 +39,10 @@ class Lang
|
||||
}
|
||||
}
|
||||
|
||||
public static function sanitize($str){
|
||||
return preg_replace("/[^A-Za-z0-9]/", '_', $str);;
|
||||
}
|
||||
|
||||
public static function getIsoLang(){
|
||||
global $isolang;
|
||||
if(empty($isolang) || count($isolang)==0){
|
||||
|
Reference in New Issue
Block a user