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

136 lines
4.9 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">
<?php echo template::button('translateFormBack', [
'class' => 'buttonGrey',
2020-11-14 14:52:18 +01:00
'href' => helper::baseUrl(),
2020-11-11 19:48:07 +01:00
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
2021-06-04 14:21:23 +02:00
<div class="col2">
2021-06-17 14:44:58 +02:00
<?php echo template::button('translateAdvancedHelp', [
2021-06-04 14:21:23 +02:00
'class' => 'buttonHelp',
'ico' => 'help',
'value' => 'Aide'
]); ?>
</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
]); ?>
</div>
<div class="col2">
2020-11-11 19:48:07 +01:00
<?php echo template::submit('translateFormSubmit'); ?>
</div>
</div>
2021-06-04 14:21:23 +02:00
<!-- Aide à propos de la configuration du site, view advanced -->
<div class="helpDisplayContent">
2021-06-17 14:44:58 +02:00
<?php echo file_get_contents( 'core/module/translate/view/index/index.help.html') ;?>
</div>
2020-11-11 19:48:07 +01:00
<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 class="col6">
<?php echo template::checkbox('translateAdmin', true, 'Traduction en mode connecté', [
'checked' => $this->getData(['config','i18n', 'admin']),
'class' => 'translateGoogleScriptOption',
'help' => 'Traduit le site et l\'interface de ZwiiCMS quand un utilisateur est connecté'
2020-11-24 15:29:47 +01:00
]); ?>
2021-06-04 13:57:44 +02:00
</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(); ?>