From 41ae0e18e1891073e544234d8b2c4a68715f7969 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sat, 21 Nov 2020 17:49:24 +0100 Subject: [PATCH] init WIP --- core/core.php | 25 +++++++++++++++++++++++++ core/layout/common.css | 24 ++++++++++++++++++++++++ core/layout/main.php | 4 +++- core/vendor/i18n/png/de.png | Bin 0 -> 119 bytes core/vendor/i18n/png/en.png | Bin 0 -> 1208 bytes core/vendor/i18n/png/es.png | Bin 0 -> 287 bytes core/vendor/i18n/png/fr.png | Bin 0 -> 96 bytes core/vendor/i18n/png/it.png | Bin 0 -> 96 bytes core/vendor/i18n/png/nl.png | Bin 0 -> 108 bytes core/vendor/i18n/png/pt.png | Bin 0 -> 395 bytes 10 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 core/vendor/i18n/png/de.png create mode 100644 core/vendor/i18n/png/en.png create mode 100644 core/vendor/i18n/png/es.png create mode 100644 core/vendor/i18n/png/fr.png create mode 100644 core/vendor/i18n/png/it.png create mode 100644 core/vendor/i18n/png/nl.png create mode 100644 core/vendor/i18n/png/pt.png 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 0000000000000000000000000000000000000000..cf8cf1589b7215fddb2054909c41fadc7cd88216 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^azHG?!2~2lPfAS&Qk(@Ik;M!Q+(IDCcpJYDq*vRCwC8Rc%aLWfVTW_m;^ZON@5AX#8O!`iB^(7}3bUvA_mq z%sIozf-_?i0TYK?~7dt+r4UKO#CtbX*YN zyjO1c@voK(*NI?o@Q6eH({Y4}Vu@BdLbRu(&gQxL-7t|YNw3(Qbo=?|th%RNon1h` zzv4Z8s#lVZ5*27PMI5^5;m|BV!~P&YYTL(#+JWCHj25jlzyBTo!UE9f>n}$ZE6&VB ziF4U+`&}*^-5C8f@#P962*NQ*DkeI(8T3I(DiJg&BJb6#i(@^5_T8x#QFOMp0m17F zc6N;r(c!e*rpev`ds>R+iD*anW&Eaie5X$K2*L*%4Q`qTETy?I0u6^l=OIzMt+b-L z-%(@!MJrCHrhDxUW+~YtGGV5ofcqeLQGl;&yT}g7%c1 zy{a^?R;{#LC_D2#QFcmB(|GToW7nG&L2|ZrAU+rjnT&nW(S_(Izb+jndS9bCM3kGb zv%bIm$}N53_|~n?i(eqx?+=!jcAPNwdzuHaXurnUavP~9%ve|I{&DxzL}(VwYEJ_)dxPmqN>j7 z>KjC3L{76AkIUw&xmWbAu5OiohKA>NXVoUZR+W+204NSvN2(fHwQvwPVZYCJe}(O0 zI2>}jLn|x(r6oMtjYdGj>?RYt&E0!p9u!iPkjLX)c87xjq;rr}K(g)Fv2NDw+wnae zCtGzo8~nI9YvfRtr($9zh+uGRa-3C`SpdQiAj?QuPhU5RBs{`?T5~MiHXJ^}{!i%5 z8zQp{+IU--FUS42Au=M-D|Czn=yaPmWaAiv0n7xG!F<>#`NY^5O{Uc`8jWm>OG}tA z=FCG>Odj*!IL3c1UjyHs+QFgu$Vy?iuwmFUwtQyu7>C9dDtsfcm)OpmNlDn$kts*! zflJt3Z16wJw?-L!?|U)+)8WB6R)yUGE`Sl>1=sHIAAZ=nm9}-)VDsf^tE>pkmN6zmH za=b#Gy`-DAkb|nIo3Z7-S*z;&9nEsFp)xU{ lvQ$ggRLC-;#nW&w8USgTe~DWM4fcb^-< literal 0 HcmV?d00001 diff --git a/core/vendor/i18n/png/nl.png b/core/vendor/i18n/png/nl.png new file mode 100644 index 0000000000000000000000000000000000000000..aeb72b664a768827bd8ca879d0c904b5b34831c9 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^azHG?!2~2lPfAS&QpTPxjv*e$lOxm@J1QSB$ojIu z;8#ePV6VX8`dN*Ei`&~T?p!-NvqeJW?yk%hw_Z6hH)e(}^DgQ<>FNIf)Xw1P>gTe~ HDWM4f7d9gV literal 0 HcmV?d00001 diff --git a/core/vendor/i18n/png/pt.png b/core/vendor/i18n/png/pt.png new file mode 100644 index 0000000000000000000000000000000000000000..e0619bc9f66ec02e64f3a4f5dda366c0d3d5dbac GIT binary patch literal 395 zcmV;60d)R}P)f#6Rw}a*Dzy=wXC@zQ!&RBi(iO%@k