Multi-language support

This commit is contained in:
bergware
2020-04-05 11:43:18 +02:00
parent 49615c909f
commit 9b2a6f845e

View File

@@ -52,8 +52,8 @@ function my_lang($text,$do=0) {
foreach ($keys as $key) if (isset($language[$key])) $text = preg_replace("/\b$key\b/",$language[$key],$text);
break;
case 3: // device translation
[$p1,$p2] = explode(' ',$text);
$text = rtrim(_($p1)." $p2");
[$p1,$p2] = preg_split('/(?<=[a-z])(?= ?[0-9]+)/',$text);
$text = _($p1).$p2;
}
return $text;
}