setDefaultLang(DEFAULT_LANGUAGE); $i18n->setPath(__DIR__ . '/../../locale'); // Change langauge when user asked for it if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'], array_keys($ALLOWED_LANGUAGES), true)) { $_SESSION['lang'] = $_POST['lang']; } /* */ $i18n->get('', 'Something, just to load the dictionary'); $locale = str_replace('_', '-', $i18n->getLoadedLang()); /* Date Format */ $date_format['txt_full'] = __('Date', '%A, %B %e, %Y'); //summary in create_date_poll.php and removal date in choix_(date|autre).php $date_format['txt_short'] = __('Date', '%A %e %B %Y'); // radio title $date_format['txt_day'] = __('Date', '%a %e'); $date_format['txt_date'] = __('Date', '%Y-%m-%d'); $date_format['txt_month_year'] = __('Date', '%B %Y'); $date_format['txt_datetime_short'] = __('Date', '%m/%d/%Y %H:%M'); if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { //%e can't be used on Windows platform, use %#d instead foreach ($date_format as $k => $v) { $date_format[$k] = preg_replace('#(?