mirror of
https://github.com/unraid/webgui.git
synced 2026-02-09 02:19:16 -06:00
Multi-language support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user