diff --git a/core/class/template.class.php b/core/class/template.class.php index 7d677f4d..2fba2c1b 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -482,7 +482,7 @@ class template { case '': $lang = 'fr'; break; - case in_array($langId,['fr', 'de', 'en', 'es', 'it', 'nl', 'pt']): + case in_array($langId,['fr_FR', 'de', 'en', 'es', 'it', 'nl', 'pt']): $lang = $langId; break; case 'site': @@ -490,7 +490,7 @@ class template { ) { $lang = $_COOKIE['ZWII_I18N_SITE']; } else { - $lang = 'fr'; + $lang = 'fr_FR'; } } return 'getData(['core', 'dataVersion']) < 11600) { unlink('core/vendor/i18n/translation.js'); } // Langue de l'interface - $this->setData(['config', 'i18n', 'interface', 'fr']); + $this->setData(['config', 'i18n', 'interface', 'fr_FR']); // Mise à jour $this->setData(['core', 'dataVersion', 11600]); diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 6a8e5614..a1e6e68f 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -42,14 +42,8 @@ class init extends common { 'redirectLogin' => true ], 'i18n' => [ - 'interface' => 'fr', - 'fr'=> 'none', - 'de'=> 'none', - 'en'=> 'none', - 'es'=> 'none', - 'it'=> 'none', - 'nl'=> 'none', - 'pt'=> 'none' + 'interface' => 'fr_FR', + 'content' => [] ] ], 'core' => [ diff --git a/core/module/plugin/plugin.php b/core/module/plugin/plugin.php index 7ac3b1c1..40267215 100644 --- a/core/module/plugin/plugin.php +++ b/core/module/plugin/plugin.php @@ -410,7 +410,7 @@ class plugin extends common { // Tableau des langues rédigées foreach (self::$languagesUI as $key => $value) { if ($this->getData(['config','i18n', $key]) === 'site' || - $key === 'fr') { + $key === 'fr_FR') { $i18nSites[$key] = $value; } } diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index c65d4176..1165d46f 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -106,7 +106,7 @@ class translate extends common { if($this->isPost()) { // Edition des langues foreach (self::$languagesUI as $keyi18n => $value) { - if ($keyi18n === 'fr') continue; + if ($keyi18n === 'fr_FR') continue; // Effacement d'une langue installée if ( is_dir( self::DATA_DIR . $keyi18n ) === true @@ -125,6 +125,7 @@ class translate extends common { } // Enregistrement des données + /* $this->setData(['config','i18n', [ 'fr' => $this->getInput('translateFR'), 'de' => $this->getInput('translateDE'), @@ -133,10 +134,10 @@ class translate extends common { 'it' => $this->getInput('translateIT'), 'nl' => $this->getInput('translateNL'), 'pt' => $this->getInput('translatePT') - ]]); + */ - // Coonfiguration dans des langues spécifiques + // Configuration dans des langues spécifiques // Eviter déconnexion automatique après son activation if ( $this->getData(['config','connect', 'autoDisconnect']) === false AND $this->getInput('configAutoDisconnect',helper::FILTER_BOOLEAN) === true ) { @@ -181,14 +182,14 @@ class translate extends common { ]); // Sauvegarder les langues de contenu $this->setData(['config', 'i18n', [ - 'interface' => $this->getInput('translateUI'), + 'interface' => $this->getInput('translateUI'),/* 'fr' => $this->getInput('translateFR'), 'de' => $this->getInput('translateDE'), 'en' => $this->getInput('translateEN'), 'es' => $this->getInput('translateES'), 'it' => $this->getInput('translateIT'), 'nl' => $this->getInput('translateNL'), - 'pt' => $this->getInput('translatePT') + 'pt' => $this->getInput('translatePT')*/ ]]); // Valeurs en sortie @@ -200,7 +201,7 @@ class translate extends common { } // Préparation de l'affichage du formulaire - + //----------------------------------------- // Liste des langues disponibles if (is_dir(self::I18N_DIR)) { $dir = getcwd(); @@ -224,7 +225,7 @@ class translate extends common { 'site' => 'Traduction rédigée', 'delete' => 'Supprimer la traduction' ]; - self::$siteTranslate = $key !== 'fr' ? false : true; + self::$siteTranslate = $key !== 'fr_FR' ? false : true; } else { self::$translateOptions [$key] = [ 'none' => 'Drapeau masqué', diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index 2792cc07..f56e3d49 100644 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -31,11 +31,11 @@
'Interface', + 'value' => 'Langue de l\'interface', 'class' => 'buttonTab' ]); ?> 'Contenu du site', + 'value' => 'Langues du contenu', 'class' => 'buttonTab' ]); ?> diff --git a/site/i18n/es.json b/site/i18n/es.json index f10cc6fa..d5d116f1 100644 --- a/site/i18n/es.json +++ b/site/i18n/es.json @@ -325,8 +325,8 @@ "Gestion": "Administrar", "Administration": "Administración", "Multilangues": "", - "Interface": "", - "Contenu du site": "", + "Langue de l'interface": "", + "Langues du contenu": "", "Traductions installées": "", "Langue de l'administration": "", "Langues installées": "", diff --git a/site/i18n/fr_FR.json b/site/i18n/fr_FR.json index b392a2f9..c0855e41 100644 --- a/site/i18n/fr_FR.json +++ b/site/i18n/fr_FR.json @@ -325,8 +325,8 @@ "Gestion": "", "Administration": "", "Multilangues": "", - "Interface": "", - "Contenu du site": "", + "Langue de l'interface": "", + "Langues du contenu": "", "Traductions installées": "", "Langue de l'administration": "", "Langues installées": "",