Language editor

This commit is contained in:
Ibnu Maksum
2024-02-19 09:52:36 +07:00
parent f550af257a
commit de4a783dba
6 changed files with 900 additions and 911 deletions

View File

@ -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){