fr_FR template Flag langue sélectionnée selected
This commit is contained in:
parent
0bac09a48d
commit
7f9f97c6a2
@ -473,19 +473,19 @@ class template {
|
||||
|
||||
/**
|
||||
* Crée un drapeau du site courante
|
||||
* @param string $langId Id de la langue à affiche ou site pour la langue traduite courante
|
||||
* @param string $langId Id de la langue à affiche ou selected pour la langue courante
|
||||
* @param string $margin Ajoute un margin autour de l'icône (choix : left, right, all)
|
||||
* @return string
|
||||
*/
|
||||
public static function flag($langId, $size = 'auto') {
|
||||
switch ($langId) {
|
||||
case '':
|
||||
$lang = 'fr';
|
||||
$lang = 'fr_FR';
|
||||
break;
|
||||
case in_array($langId,['fr_FR', 'de', 'en', 'es', 'it', 'nl', 'pt']):
|
||||
case in_array($langId,core::$languages):
|
||||
$lang = $langId;
|
||||
break;
|
||||
case 'site':
|
||||
case 'selected':
|
||||
if ( isset($_COOKIE['ZWII_I18N_SITE'])
|
||||
) {
|
||||
$lang = $_COOKIE['ZWII_I18N_SITE'];
|
||||
|
@ -190,7 +190,7 @@ class config extends common {
|
||||
];
|
||||
|
||||
// Langue traduite courante
|
||||
public static $i18nSite = 'fr';
|
||||
public static $i18nSite = 'fr_FR';
|
||||
|
||||
// Variable pour construire la liste des pages du site
|
||||
public static $onlineVersion = '';
|
||||
@ -493,16 +493,6 @@ class config extends common {
|
||||
'captchaType' => $this->getInput('connectCaptchaType'),
|
||||
'showPassword' => $this->getInput('connectShowPassword',helper::FILTER_BOOLEAN),
|
||||
'redirectLogin' => $this->getInput('connectRedirectLogin',helper::FILTER_BOOLEAN)
|
||||
],
|
||||
'i18n' => [
|
||||
'interface' => $this->getData(['config', 'i18n', 'default']),
|
||||
'fr' => $this->getData(['config', 'i18n', 'fr']),
|
||||
'de' => $this->getData(['config', 'i18n', 'de']),
|
||||
'en' => $this->getData(['config', 'i18n', 'en']),
|
||||
'es' => $this->getData(['config', 'i18n', 'es']),
|
||||
'it' => $this->getData(['config', 'i18n', 'it']),
|
||||
'nl' => $this->getData(['config', 'i18n', 'nl']),
|
||||
'pt' => $this->getData(['config', 'i18n', 'pt'])
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
@ -28,7 +28,7 @@
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('pluginImportPage', $module::$pagesList, [
|
||||
'label' => 'Importer le module dans la page ' . template::flag('site', '20px')
|
||||
'label' => 'Importer le module dans la page ' . template::flag('selected', '20px')
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -134,7 +134,7 @@
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('configLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
|
||||
'label' => 'Page "Mentions légales" ' . template::flag('site', '20px'),
|
||||
'label' => 'Page "Mentions légales" ' . template::flag('selected', '20px'),
|
||||
'selected' => $this->getData(['locale', 'legalPageId'])
|
||||
]); ?>
|
||||
</div>
|
||||
@ -148,7 +148,7 @@
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('configSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
|
||||
'label' => 'Page "Rechercher" ' . template::flag('site', '20px'),
|
||||
'label' => 'Page "Rechercher" ' . template::flag('selected', '20px'),
|
||||
'selected' => $this->getData(['locale', 'searchPageId'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -92,7 +92,7 @@ class translate extends common {
|
||||
}
|
||||
}
|
||||
// Langues cibles fr en plus
|
||||
self::$languagesInstalled = array_merge(['fr' => 'Français (fr)'],self::$languagesTarget);
|
||||
self::$languagesInstalled = array_merge(['fr_FR' => 'Français (fr_FR)'], self::$languagesTarget);
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
Loading…
Reference in New Issue
Block a user