diff --git a/core/core.php b/core/core.php index ee17187d..4c130d8a 100755 --- a/core/core.php +++ b/core/core.php @@ -239,10 +239,11 @@ class common { } // Traduction du site avec le script Google - // Lire la langue du navigateur - if ( $this->getData(['config','translate','scriptGoogle']) === true - AND $this->getData(['config','translate','autoDetect']) === true) { + // Lire la langue du navigateur si non positionnée + if ( $this->getData(['config','translate','scriptGoogle']) === true + AND $this->getData(['config','translate','autoDetect']) === true + AND !isset($_COOKIE['googtrans'])) { // Langue du navigateur if(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { setrawcookie("googtrans", '/fr/'. $_SERVER['HTTP_ACCEPT_LANGUAGE'], time() + 3600, helper::baseUrl()); @@ -3038,8 +3039,21 @@ class layout extends common { AND $this->getData(['config','translate',$key]) === 'script' ) ) { + if ( + (isset($_COOKIE['googtrans'] ) + AND substr($_COOKIE['googtrans'],4,2) === $key + ) + OR + ( isset($_COOKIE['ZWII_I18N_SITE']) + AND $_COOKIE['ZWII_I18N_SITE'] === $key + ) ) { + $select = ' id="i18nFlagSelected" '; + } else { + $select = ' id="i18nFlag" '; + } + echo '
  • '; - echo ''; + echo ''; echo '
  • '; } } diff --git a/core/layout/common.css b/core/layout/common.css index c4fbd252..91da0a5e 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -727,8 +727,12 @@ li .menuSideChild { } -#i18nContainer img { - width: 80%; +#i18nFlag { + width: 70%; +} + +#i18nFlagSelected { + width: 90%; }