diff --git a/core/core.php b/core/core.php index 5a8a02b6..898e4463 100644 --- a/core/core.php +++ b/core/core.php @@ -45,7 +45,7 @@ class common { // Numéro de version const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; - const ZWII_VERSION = '11.2.00.10'; + const ZWII_VERSION = '11.2.00.11'; const ZWII_UPDATE_CHANNEL = "test"; public static $actions = []; @@ -265,6 +265,12 @@ class common { * */ if ( $this->getInput('ZWII_I18N_SCRIPT') !== substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ) ) { setrawcookie('googtrans', '/fr/'.substr( $_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ), time() + 3600, helper::baseUrl(false, false)); + } else { + // Langue du drapeau si elle est définie + if ( $this->getInput('ZWII_I18N_SCRIPT') !== '' ) { + // Paramètre du script + setrawcookie("googtrans", '/fr/'. $this->getInput('ZWII_I18N_SCRIPT') , time() + 3600, helper::baseUrl(false,false)); + } } } @@ -2130,7 +2136,7 @@ class common { } echo '
  • '; - echo '' .  $value . ''; + echo '' .  $value . ''; echo '
  • '; } } @@ -2810,8 +2816,7 @@ class core extends common { ) ) { - // Paramètre du script - setrawcookie("googtrans", '/fr/'. $this->getInput('ZWII_I18N_SCRIPT') , time() + 3600, helper::baseUrl(false,false)); + // Chargement de la librairie $this->addOutput([ 'vendor' => array_merge($this->output['vendor'], ['i18n']) diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index fac13c58..b5a80865 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -19,7 +19,7 @@ class translate extends common { /*'config' => self::GROUP_MODERATOR,*/ 'index' => self::GROUP_ADMIN, 'copy' => self::GROUP_ADMIN, - 'language' => self::GROUP_VISITOR + 'i18n' => self::GROUP_VISITOR ]; public static $translateOptions = []; @@ -177,7 +177,7 @@ class translate extends common { * Traitement du changement de langue * Fonction utilisée par le noyau */ - public function language() { + public function i18n() { // Activation du drapeau if ( $this->getInput('ZWII_I18N_' . strtoupper($this->getUrl(3))) !== $this->getUrl(2) ) {