BUGFIX: use english language as default in set_language
authorArun Persaud <arun@nubati.net>
Wed, 16 Jan 2013 02:27:29 +0000 (18:27 -0800)
committerArun Persaud <arun@nubati.net>
Wed, 16 Jan 2013 02:27:29 +0000 (18:27 -0800)
before the previous language was kept which could have been e.g. German,
even if the person didn't choose German.

include/functions.php

index d7ff065..a332347 100644 (file)
@@ -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;
 }