diff --git a/core/core.php b/core/core.php
index f6e7cf70..deaaaad9 100755
--- a/core/core.php
+++ b/core/core.php
@@ -228,7 +228,7 @@ class common {
}
// Traduction du site avec le script Google
- if ( $this->getData(['config','translate','activated'])) {
+ if ( $this->getData(['config','translate','scriptGoogle'])) {
// Lire la langue stockée dans le cookie (choix manuel)
if ( isset($_COOKIE['ZWII_USER_I18N']) ) {
$lan_cookie = $_COOKIE['ZWII_USER_I18N'];
@@ -1567,7 +1567,7 @@ class common {
$this->setData(['locale','searchPageId',$this->getData(['config','searchPageId'])]);
$this->setData(['locale','metaDescription',$this->getData(['config','metaDescription'])]);
$this->setData(['locale','title',$this->getData(['config','title'])]);
- $this->setData(['config','translate','activated',false]);
+ $this->setData(['config','translate','scriptGoogle',false]);
$this->setData(['config','translate','showCredits',false]);
$this->setData(['config','translate','autoDetect',false]);
$this->setData(['core', 'dataVersion', 10400]);
@@ -2157,7 +2157,7 @@ class core extends common {
// Chargement de la librairie ggogtrans
// Le multi langue est actif
- if ($this->getData(['config','translate','activated']) === true ) {
+ if ($this->getData(['config','translate','scriptGoogle']) === true ) {
// la traduction auto est active
if ( $this->getData(['config','translate','autoDetect']) === true
// Cas des pages d'administration
@@ -2312,7 +2312,7 @@ class layout extends common {
*/
if ( (
- ( $this->getData(['config','translate','activated']) === true
+ ( $this->getData(['config','translate','scriptGoogle']) === true
AND substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr'
)
OR ( isset($_COOKIES['ZWII_USER_I18N'])
@@ -3010,10 +3010,10 @@ class layout extends common {
* Affiche le cadre avec les drapeaux
*/
public function showi18n() {
- if ( $this->getData(['config','translate','activated']) === true ) {
+ if ( $this->getData(['config','translate','scriptGoogle']) === true ) {
echo '
';
foreach (self::$i18nList as $key => $value) {
- if ($this->getData(['config','translate','flag' . strtoupper($key)]) ) {
+ if ($this->getData(['config','translate','script' . strtoupper($key)]) ) {
echo '- ';
echo '';
echo '
';
diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php
index ba87aaa1..1bfcaec4 100755
--- a/core/module/install/ressource/defaultdata.php
+++ b/core/module/install/ressource/defaultdata.php
@@ -43,7 +43,7 @@ class init extends common {
'captcha' => true
],
'translate' => [
- 'activated' => false,
+ 'scriptGoogle' => false,
'showCredits' => false,
'autoDetect' => false,
'admin' => false,
diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php
index d16588c1..f1b8741d 100755
--- a/core/module/translate/translate.php
+++ b/core/module/translate/translate.php
@@ -27,17 +27,25 @@ class translate extends common {
// Soumission du formulaire
if($this->isPost()) {
$this->setData(['config','translate', [
- 'activated' => $this->getInput('translateActivated', helper::FILTER_BOOLEAN),
+ 'scriptGoogle' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN),
'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false,
'autoDetect' => $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN),
'admin' => $this->getInput('translateAdmin', helper::FILTER_BOOLEAN),
- 'flagFR' => $this->getInput('translateFlagFR', helper::FILTER_BOOLEAN),
- 'flagDE' => $this->getInput('translateFlagDE', helper::FILTER_BOOLEAN),
- 'flagEN' => $this->getInput('translateFlagEN', helper::FILTER_BOOLEAN),
- 'flagES' => $this->getInput('translateFlagES', helper::FILTER_BOOLEAN),
- 'flagIT' => $this->getInput('translateFlagIT', helper::FILTER_BOOLEAN),
- 'flagNL' => $this->getInput('translateFlagNL', helper::FILTER_BOOLEAN),
- 'flagPT' => $this->getInput('translateFlagPT', helper::FILTER_BOOLEAN)
+ 'scriptFR' => $this->getInput('translateFlagScriptFR', helper::FILTER_BOOLEAN),
+ 'scriptDE' => $this->getInput('translateFlagScriptDE', helper::FILTER_BOOLEAN),
+ 'scriptEN' => $this->getInput('translateFlagScriptEN', helper::FILTER_BOOLEAN),
+ 'scriptES' => $this->getInput('translateFlagScriptES', helper::FILTER_BOOLEAN),
+ 'scriptIT' => $this->getInput('translateFlagScriptIT', helper::FILTER_BOOLEAN),
+ 'scriptNL' => $this->getInput('translateFlagScriptNL', helper::FILTER_BOOLEAN),
+ 'scriptPT' => $this->getInput('translateFlagScriptPT', helper::FILTER_BOOLEAN),
+ 'site' => $this->getInput('translateSite', helper::FILTER_BOOLEAN),
+ 'siteFR' => $this->getInput('translateFlagSiteFR', helper::FILTER_BOOLEAN),
+ 'siteDE' => $this->getInput('translateFlagSiteDE', helper::FILTER_BOOLEAN),
+ 'siteEN' => $this->getInput('translateFlagSiteEN', helper::FILTER_BOOLEAN),
+ 'siteES' => $this->getInput('translateFlagSiteES', helper::FILTER_BOOLEAN),
+ 'siteIT' => $this->getInput('translateFlagSiteIT', helper::FILTER_BOOLEAN),
+ 'siteNL' => $this->getInput('translateFlagSiteNL', helper::FILTER_BOOLEAN),
+ 'sitePT' => $this->getInput('translateFlagSitePT', helper::FILTER_BOOLEAN)
]]);
// Valeurs en sortie
$this->addOutput([
diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php
index 9c17b17d..87dc60df 100755
--- a/core/module/translate/view/index/index.php
+++ b/core/module/translate/view/index/index.php
@@ -15,77 +15,125 @@
-
Paramètres
+
Traduction automatique (Google Translate)
- $this->getData(['config','translate', 'activated'])
+ $this->getData(['config','translate', 'scriptGoogle'])
]); ?>
+
+
+ $this->getData(['config','translate', 'autoDetect']),
+ 'help' => 'Détecte la langue du navigateur.'
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'scriptFR'])
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'scriptDE'])
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'scriptEN'])
+ ]); ?>
+
+
+
+
+ $this->getData(['config','translate', 'scriptES'])
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'scriptIT'])
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'scriptNL'])
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'scriptPT'])
+ ]); ?>
+
+
+
+
+ $this->getData(['config','translate', 'admin']),
+ 'help' => 'Traduction automatique du site et de l\'interface du CMS'
+ ]); ?>
+
+
+ $this->getData(['config','translate', 'showCredits']),
+ 'help' => 'Option vivement recommandée pour le respect du droit d\'auteur'
+ ]); ?>
+
+
-
Traduction automatique
+
Traduction rédigée
-
- $this->getData(['config','translate', 'autoDetect']),
- 'help' => 'Détecte la langue du navigateur et effectue une traduction grâce à Google Translate.'
- ]); ?>
-
-
- $this->getData(['config','translate', 'admin']),
- 'help' => 'Traduction automatique du site et de l\'interface du CMS'
+
+ $this->getData(['config','translate', 'site'])
]); ?>
+
+
Sélectionnez les langues à activer :
+
+
+ true,
+ 'disabled' => true
+ ]); ?>
+
+
+ $this->getData(['config', 'translate', 'siteDE'])
+ ]); ?>
+
+
+ $this->getData(['config', 'translate', 'siteEN'])
+ ]); ?>
+
+
+ $this->getData(['config', 'translate', 'siteES'])
+ ]); ?>
+
+
+
- $this->getData(['config','translate', 'showCredits']),
- 'help' => 'Option vivement recommandée pour le respect du droit d\'auteur'
+ $this->getData(['config', 'translate', 'siteIT'])
]); ?>
-
-
-
- $this->getData(['config','translate', 'flagFR'])
+
+ $this->getData(['config', 'translate', 'siteNL'])
]); ?>
-
- $this->getData(['config','translate', 'flagDE'])
- ]); ?>
-
-
- $this->getData(['config','translate', 'flagEN'])
- ]); ?>
-
-
- $this->getData(['config','translate', 'flagES'])
- ]); ?>
-
-
-
-
- $this->getData(['config','translate', 'flagIT'])
- ]); ?>
-
-
- $this->getData(['config','translate', 'flagNL'])
- ]); ?>
-
-
- $this->getData(['config','translate', 'flagPT'])
+
+ $this->getData(['config', 'translate', 'sitePT'])
]); ?>
diff --git a/core/vendor/i18n/translate.js b/core/vendor/i18n/translate.js
index 49ab2efd..e7447418 100755
--- a/core/vendor/i18n/translate.js
+++ b/core/vendor/i18n/translate.js
@@ -46,7 +46,7 @@
c._cest = gtConstEvalStartTime;
gtConstEvalStartTime = undefined;
c._cl = 'fr';
- c._cuc = 'googleTranslateElementInit';
+ c._cuc = 'scriptGoogleElementInit';
c._cac = '';
c._cam = '';
c._ctkk = '433074.3898829376';
diff --git a/core/vendor/i18n/translation.js b/core/vendor/i18n/translation.js
index d246dfc1..5d12ec31 100755
--- a/core/vendor/i18n/translation.js
+++ b/core/vendor/i18n/translation.js
@@ -1,4 +1,4 @@
-function googleTranslateElementInit() {
+function scriptGoogleElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'fr'
}, 'google_translate_element');