diff --git a/core/core.php b/core/core.php index 409038c5..3b22d6aa 100644 --- a/core/core.php +++ b/core/core.php @@ -431,6 +431,19 @@ class common // Mise à jour des données core include('core/include/update.inc.php'); + require_once('core/module/install/ressource/defaultdata.php'); + $installedLanguages = $this->getData(['language']); + $defaultLanguages = init::$defaultData['language']; + foreach ($installedLanguages as $key => $value) { + if ( + isset($defaultLanguages[$key]['version']) && + $defaultLanguages[$key]['version'] > $value['version'] + ) { + copy('core/module/install/ressource/i18n/' . $key . '.json', self::I18N_DIR . $key . '.json'); + $this->setData(['language', $key, $defaultLanguages[$key]]); + } + } + }