From: Arun Persaud Date: Wed, 16 Jan 2013 02:27:29 +0000 (-0800) Subject: BUGFIX: use english language as default in set_language X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=2a529cf743274f63cd15f7f33b58b943338e1049;hp=ce9ff41fcaafccffd22390e85959957745751075 BUGFIX: use english language as default in set_language before the previous language was kept which could have been e.g. German, even if the person didn't choose German. --- diff --git a/include/functions.php b/include/functions.php index d7ff065..a332347 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1726,16 +1726,19 @@ function set_language($l,$type='lang') case 'de': putenv("LC_ALL=de_DE"); setlocale(LC_ALL, "de_DE"); - // Specify location of translation tables - bindtextdomain("edoko", "./locale"); - bind_textdomain_codeset("edoko", 'UTF-8'); - // Choose domain - textdomain("edoko"); break; default: - /* do nothing */ + putenv("LC_ALL=en_US"); + setlocale(LC_ALL, "en_US"); + break; } + // Specify location of translation tables + bindtextdomain("edoko", "./locale"); + bind_textdomain_codeset("edoko", 'UTF-8'); + // Choose domain + textdomain("edoko"); + return; }