diff --git a/core/core.php b/core/core.php index bc6fb0c8..6295b341 100755 --- a/core/core.php +++ b/core/core.php @@ -141,6 +141,16 @@ class common { self::GROUP_MODERATOR => 'Éditeur', self::GROUP_ADMIN => 'Administrateur' ]; + // Langues proposées + public static $i18nList = [ + 'de' => 'Allemand (de)', + 'en' => 'Anglais (en)', + 'es' => 'Espagnol (es)', + 'fr' => 'Français (fr)', + 'it' => 'Italien (it)', + 'nl' => 'Néerlandais (nl)', + 'pt' => 'Portugais (pt)', + ]; public static $timezone; private $url = ''; // Données de site @@ -2962,4 +2972,19 @@ class layout extends common { } } } + /** + * Affiche le cadre avec les drapeaux + */ + public function showi18n() { + if ( $this->getData(['translate','active']) === true + AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) { + echo '
'; + } + } } diff --git a/core/layout/common.css b/core/layout/common.css index 60f31f09..17a8ff2f 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -695,6 +695,7 @@ nav::before { pointer-events: none; } + /* Menu vertical */ .menuSide, @@ -709,6 +710,29 @@ li .menuSideChild { padding-left: 10px; } +/* Container des drapeaux */ + +#i18nContainer { + z-index: 100; + position: absolute ; + width: 80px; + height: 20px; + margin: 5px; + top: 5px; + right: 10px; +} + +#i18nContainer ul { + list-style: none; +} + +#i18nContainer img { + margin: 2px; +} + + + + /* Corps */ @media (min-width:768px) { diff --git a/core/layout/main.php b/core/layout/main.php index 5fc51661..685cd902 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -31,6 +31,7 @@ $lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?> showBar(); ?> showNotification(); ?> + showi18n();?> getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?> @@ -193,7 +194,8 @@ $lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?> if ($blockleft !== "") :?>
-
showContent(); +
+ showContent(); if (file_exists(self::DATA_DIR . 'body.inc.html')) { include(self::DATA_DIR . 'body.inc.html'); } diff --git a/core/vendor/i18n/png/de.png b/core/vendor/i18n/png/de.png new file mode 100644 index 00000000..cf8cf158 Binary files /dev/null and b/core/vendor/i18n/png/de.png differ diff --git a/core/vendor/i18n/png/en.png b/core/vendor/i18n/png/en.png new file mode 100644 index 00000000..a11a31db Binary files /dev/null and b/core/vendor/i18n/png/en.png differ diff --git a/core/vendor/i18n/png/es.png b/core/vendor/i18n/png/es.png new file mode 100644 index 00000000..a8ad334c Binary files /dev/null and b/core/vendor/i18n/png/es.png differ diff --git a/core/vendor/i18n/png/fr.png b/core/vendor/i18n/png/fr.png new file mode 100644 index 00000000..a7684766 Binary files /dev/null and b/core/vendor/i18n/png/fr.png differ diff --git a/core/vendor/i18n/png/it.png b/core/vendor/i18n/png/it.png new file mode 100644 index 00000000..d62e50b2 Binary files /dev/null and b/core/vendor/i18n/png/it.png differ diff --git a/core/vendor/i18n/png/nl.png b/core/vendor/i18n/png/nl.png new file mode 100644 index 00000000..aeb72b66 Binary files /dev/null and b/core/vendor/i18n/png/nl.png differ diff --git a/core/vendor/i18n/png/pt.png b/core/vendor/i18n/png/pt.png new file mode 100644 index 00000000..e0619bc9 Binary files /dev/null and b/core/vendor/i18n/png/pt.png differ