Updated: Localization install flow in back office
Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
@@ -339,9 +339,14 @@ class LocalizationPackCore
|
||||
continue;
|
||||
}
|
||||
|
||||
$errors = Language::downloadAndInstallLanguagePack($attributes['iso_code'], $attributes['version'], $attributes);
|
||||
if ($errors !== true && is_array($errors)) {
|
||||
$this->_errors = array_merge($this->_errors, $errors);
|
||||
$version = isset($attributes['version']) ? (string)$attributes['version'] : null;
|
||||
$lang_pack_response = Language::downloadAndInstallLanguagePack($attributes['iso_code'], $version, null);
|
||||
if ($lang_pack_response !== true) {
|
||||
if (!Language::checkAndAddLanguage($attributes['iso_code'], false, $install_mode)) {
|
||||
$this->_errors[] = sprintf(Tools::displayError('Cannot install language "%s"'), $attributes['iso_code']);
|
||||
} else {
|
||||
Language::loadLanguages();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user