mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 21:20:01 -06:00
Multi-language support
This commit is contained in:
@@ -206,14 +206,14 @@ if ($method == 'install') {
|
||||
$xml_file = realpath($argv[2]);
|
||||
$name = basename($xml_file);
|
||||
}
|
||||
$link_file = "$plugins/dynamix.$name";
|
||||
$lang_file = "$boot/dynamix.$name";
|
||||
@unlink($link_file);
|
||||
if (language('install', $xml_file, $error) === false) {
|
||||
echo "language: $error\n";
|
||||
exit(1);
|
||||
}
|
||||
$lang = language('Language', $xml_file, $error) ?: substr($name,0,-4);
|
||||
$link_file = "$plugins/dynamix.$name";
|
||||
$lang_file = "$boot/dynamix.$name";
|
||||
copy($xml_file, $lang_file);
|
||||
symlink($lang_file, $link_file);
|
||||
echo "language: $lang language pack installed\n";
|
||||
|
||||
Reference in New Issue
Block a user