diff --git a/core/core.php b/core/core.php
index 275f095d..db9224a4 100644
--- a/core/core.php
+++ b/core/core.php
@@ -201,8 +201,6 @@ class common {
// Changer la locale
if ( $lan !== 'fr') {
setlocale (LC_TIME, $lan . '_' . strtoupper ($lan) );
- }
- if ($lan !== 'fr') {
// Charge la librairie Google Translate
setrawcookie("googtrans", '/fr/'. $lan, time() + 3600, helper::baseUrl());
} else {
@@ -2047,8 +2045,10 @@ class core extends common {
}
}
}
+
// Librairie googtrans ajouté dynamiquement
- if ( $this->getData(['translate','active']) === true
+ if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr'
+ AND $this->getData(['translate','active']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) {
$this->addOutput([
'vendor' => array_merge($this->output['vendor'], ['i18n'])
@@ -2181,9 +2181,15 @@ class layout extends common {
) {
echo '
' . $this->core->output['title'] . '
';
}
- echo $this->core->output['content'];
- }
+ echo $this->core->output['content'];
+ if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr'
+ AND $this->getData(['translate','showCredits']) === true
+ AND $this->getData(['translate','active']) === true )
+ {
+ echo '';
+ }
+ }
/**
* Affiche le contenu de la barre gauche
diff --git a/core/layout/blank.php b/core/layout/blank.php
index 5e1266fa..ae92b811 100644
--- a/core/layout/blank.php
+++ b/core/layout/blank.php
@@ -1,6 +1,7 @@
-
+
-
+
diff --git a/core/layout/common.css b/core/layout/common.css
index b0307fdb..80a09f31 100755
--- a/core/layout/common.css
+++ b/core/layout/common.css
@@ -1433,3 +1433,28 @@ th.col12 {
-o-transform:scale(1.25); /* Opera */
transform:scale(1.25);
}
+
+
+/* Traduction auto */
+/*
+* Supprimer Le tooltip Google
+*
+.goog-tooltip {
+ display: none !important;
+}
+.goog-tooltip:hover {
+ display: none !important;
+}
+.goog-text-highlight {
+ background-color: transparent !important;
+ border: none !important;
+ box-shadow: none !important;
+} */
+
+/* Emplacement des conditions d'utilisation */
+#googTransLogo {
+ float: right;
+}
+#googTransLogo img {
+ width: 60%;
+}
\ No newline at end of file
diff --git a/core/layout/light.php b/core/layout/light.php
index 2c43b144..a781f64e 100644
--- a/core/layout/light.php
+++ b/core/layout/light.php
@@ -1,6 +1,7 @@
-
+
-
+
diff --git a/core/layout/main.php b/core/layout/main.php
index 4590235f..a97261b2 100644
--- a/core/layout/main.php
+++ b/core/layout/main.php
@@ -1,6 +1,7 @@
-
+
-
+
diff --git a/core/module/translate/ressource/de.png b/core/module/translate/ressource/de.png
new file mode 100644
index 00000000..cf8cf158
Binary files /dev/null and b/core/module/translate/ressource/de.png differ
diff --git a/core/module/translate/ressource/en.png b/core/module/translate/ressource/en.png
new file mode 100644
index 00000000..a11a31db
Binary files /dev/null and b/core/module/translate/ressource/en.png differ
diff --git a/core/module/translate/ressource/es.png b/core/module/translate/ressource/es.png
new file mode 100644
index 00000000..a8ad334c
Binary files /dev/null and b/core/module/translate/ressource/es.png differ
diff --git a/core/module/translate/ressource/fr.png b/core/module/translate/ressource/fr.png
new file mode 100644
index 00000000..a7684766
Binary files /dev/null and b/core/module/translate/ressource/fr.png differ
diff --git a/core/module/translate/ressource/googtrans.png b/core/module/translate/ressource/googtrans.png
new file mode 100644
index 00000000..6a839143
Binary files /dev/null and b/core/module/translate/ressource/googtrans.png differ
diff --git a/core/module/translate/ressource/it.png b/core/module/translate/ressource/it.png
new file mode 100644
index 00000000..d62e50b2
Binary files /dev/null and b/core/module/translate/ressource/it.png differ
diff --git a/core/module/translate/ressource/nl.png b/core/module/translate/ressource/nl.png
new file mode 100644
index 00000000..aeb72b66
Binary files /dev/null and b/core/module/translate/ressource/nl.png differ
diff --git a/core/module/translate/ressource/pt.png b/core/module/translate/ressource/pt.png
new file mode 100644
index 00000000..e0619bc9
Binary files /dev/null and b/core/module/translate/ressource/pt.png differ
diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php
index 8efb2e8c..447cedf5 100644
--- a/core/module/translate/translate.php
+++ b/core/module/translate/translate.php
@@ -27,7 +27,7 @@ class translate extends common {
if($this->isPost()) {
$this->setData(['translate', [
'active' => $this->getInput('translateActive', helper::FILTER_BOOLEAN),
- 'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN),
+ 'showCredits' => $this->getInput('translateActive', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false,
]]);
// Valeurs en sortie
$this->addOutput([
diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php
index 00de0b0f..84b9da20 100644
--- a/core/module/translate/view/index/index.php
+++ b/core/module/translate/view/index/index.php
@@ -19,12 +19,14 @@
$this->getData(['translate', 'active'])
+ 'checked' => $this->getData(['translate', 'active']),
+ 'check' => 'Traduction automatique du site hors connexion par le script Google Traduction basée sur la langue du navigateur du visiteur.'
]); ?>
$this->getData(['translate', 'showCredits'])
+ 'checked' => $this->getData(['translate', 'showCredits']),
+ 'help' => 'Option vivement recommandée pour le respect du droit d\'auteur'
]); ?>