From db05126f0141f77d502059d1d83495dc7ad2426c Mon Sep 17 00:00:00 2001 From: pascalc <pascal.chevrel@free.fr> Date: Mon, 4 Mar 2013 18:55:13 +0100 Subject: [PATCH] =?UTF-8?q?fix=20issue=201=20:=20permet=20de=20faire=20fon?= =?UTF-8?q?ctionner=20gettext=20avec=20le=20serveur=20de=20dev=20de=20PHP5?= =?UTF-8?q?.4=20+=20enl=C3=A8ve=20code=20comment=C3=A9=20depuis=20des=20an?= =?UTF-8?q?n=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n.php b/i18n.php index 3ca9a33f..439fee73 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]); -- GitLab