2014-09-04 17:52:18 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* This software is governed by the CeCILL-B license. If a copy of this license
|
|
|
|
* is not distributed with this file, you can obtain one at
|
|
|
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
|
|
|
*
|
|
|
|
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
2016-08-04 22:26:37 +02:00
|
|
|
* Authors of Framadate/OpenSondage: Framasoft (https://github.com/framasoft)
|
2014-09-04 17:52:18 +02:00
|
|
|
*
|
|
|
|
* =============================
|
|
|
|
*
|
|
|
|
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
|
|
|
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
|
|
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
|
|
|
*
|
|
|
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
|
|
|
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
|
|
|
*/
|
|
|
|
|
2015-03-22 23:33:03 +01:00
|
|
|
// Prepare I18N instance
|
|
|
|
$i18n = \o80\i18n\I18N::instance();
|
|
|
|
$i18n->setDefaultLang(DEFAULT_LANGUAGE);
|
|
|
|
$i18n->setPath(__DIR__ . '/../../locale');
|
|
|
|
|
|
|
|
// Change langauge when user asked for it
|
2018-02-19 00:18:43 +01:00
|
|
|
if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'], array_keys($ALLOWED_LANGUAGES), true)) {
|
2015-01-20 00:05:43 +01:00
|
|
|
$_SESSION['lang'] = $_POST['lang'];
|
2014-11-14 22:34:40 +01:00
|
|
|
}
|
2014-09-04 17:52:18 +02:00
|
|
|
|
2015-04-13 11:24:44 +02:00
|
|
|
/* <html lang="$locale"> */
|
2015-05-29 17:12:47 +02:00
|
|
|
$i18n->get('', 'Something, just to load the dictionary');
|
2018-03-19 12:15:38 +01:00
|
|
|
$locale = str_replace('_', '-', $i18n->getLoadedLang());
|
2014-11-14 17:35:22 +01:00
|
|
|
|
|
|
|
/* Date Format */
|
2015-03-30 15:19:56 +02:00
|
|
|
$date_format['txt_full'] = __('Date', 'FULL'); //summary in create_date_poll.php and removal date in choix_(date|autre).php
|
|
|
|
$date_format['txt_short'] = __('Date', 'SHORT'); // radio title
|
|
|
|
$date_format['txt_day'] = __('Date', 'DAY');
|
|
|
|
$date_format['txt_date'] = __('Date', 'DATE');
|
|
|
|
$date_format['txt_month_year'] = __('Date', 'MONTH_YEAR');
|
2015-10-12 23:14:21 +02:00
|
|
|
$date_format['txt_datetime_short'] = __('Date', 'DATETIME');
|
2018-02-19 00:18:43 +01:00
|
|
|
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { //%e can't be used on Windows platform, use %#d instead
|
2015-01-20 00:05:43 +01:00
|
|
|
foreach ($date_format as $k => $v) {
|
|
|
|
$date_format[$k] = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $v); //replace %e by %#d for windows
|
2014-11-14 17:35:22 +01:00
|
|
|
}
|
|
|
|
}
|