From aeb9ef98850e762291bc6a1d39b31d1ac4db4817 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Mon, 31 Dec 2012 15:11:45 +0000 Subject: improved language detection using browser information; set the language directly in more places previously one had to reload to get the language correct, now it should be correct right away. We also read out the browser request for a language now. --- digest.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'digest.php') diff --git a/digest.php b/digest.php index d501e0a..2416228 100644 --- a/digest.php +++ b/digest.php @@ -53,21 +53,7 @@ foreach($users as $uid) $PREF = DB_get_PREF($uid); // set users language preference - $language = $PREF['language']; - - switch($language) - { - case 'de': - putenv("LC_ALL=de_DE"); - setlocale(LC_ALL, "de_DE"); - // Specify location of translation tables - bindtextdomain("edoko", "./locale"); - // Choose domain - textdomain("edoko"); - break; - default: - /* do nothing */ - } + set_language($PREF['language']); // calculate mod by digest-time switch($PREF['digest']) -- cgit v1.2.3-18-g5258