diff --git a/i18n.php b/i18n.php index 3ca9a33f248bfc16c7528cbac634300eac5cf667..439fee73d0b0f9e18ca1f07ba76f8981f7578b2d 100644 --- a/i18n.php +++ b/i18n.php @@ -1,5 +1,4 @@ <?php -//$locale = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); if (isset($_GET['lang']) && is_string($_GET['lang']) && in_array($_GET['lang'], array_keys($ALLOWED_LANGUAGES)) ) { $mlocale = $_GET['lang'] ; @@ -11,6 +10,7 @@ if (isset($_GET['lang']) && is_string($_GET['lang']) && in_array($_GET['lang'], } $locale = $mlocale . '.utf8'; +putenv('LANGUAGE='); setlocale(LC_ALL, $locale); setlocale(LC_TIME, $locale); setlocale(LC_MESSAGES, $locale); @@ -22,4 +22,4 @@ textdomain($domain); /* temp, for compatibility :*/ $a = explode('_', $locale); -$_SESSION['langue'] = strtoupper($a[0]); \ No newline at end of file +$_SESSION['langue'] = strtoupper($a[0]);