ZwiiCMS/core/module/translate/view/index/index.php

127 lines
4.4 KiB
PHP
Raw Normal View History

2020-11-11 19:48:07 +01:00
<?php echo template::formOpen('translateForm'); ?>
<div class="row">
<div class="col2">
2020-11-11 19:48:07 +01:00
<?php echo template::button('translateFormBack', [
'class' => 'buttonGrey',
2020-11-14 14:52:18 +01:00
'href' => helper::baseUrl(),
'ico' => 'left',
'value' => 'Retour'
2020-11-11 19:48:07 +01:00
]); ?>
</div>
<div class="col2">
2021-11-04 19:12:27 +01:00
<?php echo template::button('translateHelp', [
2021-11-04 18:59:53 +01:00
'href' => 'https://doc.zwiicms.fr/prise-en-charge-des-langues-etrangeres',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide',
'class' => 'buttonHelp'
2021-06-04 14:21:23 +02:00
]); ?>
</div>
<div class="col3 offset3">
<?php echo template::button('translateButton', [
2021-06-04 13:57:44 +02:00
'href' => helper::baseUrl() . 'translate/copy',
'value' => 'Utilitaire de copie',
'ico' => 'cog-alt',
'disabled' => $module::$siteTranslate
2021-06-04 13:57:44 +02:00
]); ?>
</div>
<div class="col2">
2020-11-11 19:48:07 +01:00
<?php echo template::submit('translateFormSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
2021-11-01 14:38:28 +01:00
<h4>Traduction automatique</h4>
<div class="row">
<div class="col6">
2021-06-04 13:57:44 +02:00
<?php echo template::checkbox('translateScriptGoogle', true, 'Active le script de traduction automatique', [
'checked' => $this->getData(['config','i18n', 'scriptGoogle']),
'help' => 'Le script Google Translate assure la traduction automatique du site.'
]); ?>
2021-06-04 13:57:44 +02:00
</div>
<div class="col6">
<?php echo template::checkbox('translateAutoDetect', true, 'Détection automatique de la langue du navigateur', [
'checked' => $this->getData(['config','i18n', 'autoDetect']),
'class' => 'translateGoogleScriptOption',
'help' => 'Détecte la langue du navigateur, dans ce mode il n\'est pas nécessaire d\'afficher les drapeaux.'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('translateCredits', true, 'Afficher les crédits du script Google', [
'checked' => $this->getData(['config','i18n', 'showCredits']),
'class' => 'translateGoogleScriptOption',
'help' => 'Option recommandée pour le respect du droit d\'auteur'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="flagsWrapper">
<h4>Mode de traduction et affichage des drapeaux</h4>
<div class="row">
<div class="col3">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translateFR', ['none'=>'Drapeau masqué','site'=>'Drapeau affiché'], [
'label' => template::flag('', '30px'),
'selected' => $this->getData(['config', 'i18n' , 'fr']),
2021-06-04 13:57:44 +02:00
]); ?>
</div>
<div class="col3">
<div class="col12">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translateDE', $module::$translateOptions['de'], [
'label' => template::flag('de', '30px'),
2021-06-04 13:57:44 +02:00
'class' => 'translateFlagSelect',
'selected' => $this->getData(['config', 'i18n' , 'de'])
2020-11-25 14:04:04 +01:00
]); ?>
</div>
<div class="col12">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translateEN', $module::$translateOptions['en'], [
'label' => template::flag('en', '30px'),
2021-06-04 13:57:44 +02:00
'class' => 'translateFlagSelect',
'selected' => $this->getData(['config', 'i18n' , 'en'])
2020-11-25 14:04:04 +01:00
]); ?>
</div>
</div>
<div class="col3">
<div class="col12">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translateES', $module::$translateOptions['es'], [
'label' => template::flag('es', '30px'),
2021-06-04 13:57:44 +02:00
'class' => 'translateFlagSelect',
'selected' => $this->getData(['config', 'i18n' , 'es'])
2021-05-20 21:52:09 +02:00
]); ?>
</div>
<div class="col12">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translateIT', $module::$translateOptions['it'], [
'label' => template::flag('it', '30px'),
2021-06-04 13:57:44 +02:00
'class' => 'translateFlagSelect',
'selected' => $this->getData(['config', 'i18n' , 'it'])
2020-11-25 14:04:04 +01:00
]); ?>
</div>
</div>
<div class="col3">
<div class="col12">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translateNL', $module::$translateOptions['nl'], [
'label' => template::flag('nl', '30px'),
2021-06-04 13:57:44 +02:00
'class' => 'translateFlagSelect',
'selected' => $this->getData(['config', 'i18n' , 'nl'])
2020-11-25 14:04:04 +01:00
]); ?>
</div>
<div class="col12">
2021-06-04 13:57:44 +02:00
<?php echo template::select('translatePT', $module::$translateOptions['pt'], [
'label' => template::flag('pt', '30px'),
2021-06-04 13:57:44 +02:00
'class' => 'translateFlagSelect',
'selected' => $this->getData(['config', 'i18n' , 'pt'])
2020-11-24 19:00:23 +01:00
]); ?>
2020-11-25 14:04:04 +01:00
</div>
</div>
</div>
2020-11-22 13:32:20 +01:00
</div>
2020-11-11 19:48:07 +01:00
</div>
</div>
<?php echo template::formClose(); ?>