Multi-language support

This commit is contained in:
bergware
2020-05-01 18:43:06 +02:00
parent 56d7ec5fb4
commit 3ed46fca1d

View File

@@ -87,14 +87,16 @@ function language($method, $xml_file, &$error) {
$url = $xml->LanguageURL;
$zip = basename($url);
$save = "$boot/dynamix/$zip";
if ($url) {
if (!download($url, $save, $error)) {
@unlink($save);
if (!file_exists($save)) {
if ($url) {
if (!download($url, $save, $error)) {
@unlink($save);
return false;
}
} else {
$error = "missing URL";
return false;
}
} else {
$error = "missing URL";
return false;
}
$name = str_replace('.lang.zip','',$zip);
$path = "$docroot/languages/$name";