Added argument to set-up_language to force default language
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 3 Jul 2003 20:20:26 +0000 (20:20 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 3 Jul 2003 20:20:26 +0000 (20:20 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5211 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/i18n.php

index 791f0d9..fcd29cd 100644 (file)
@@ -179,7 +179,7 @@ function charset_decode_ns_4551_1 ($string) {
  * if $do_search is true, then scan the browser information
  * for a possible language that we know
  */
-function set_up_language($sm_language, $do_search = false) {
+function set_up_language($sm_language, $do_search = false, $default = false) {
 
     static $SetupAlready = 0;
     global $use_gettext, $languages,
@@ -197,7 +197,7 @@ function set_up_language($sm_language, $do_search = false) {
         $sm_language = substr($accept_lang, 0, 2);
     }
     
-    if (!$sm_language && isset($squirrelmail_default_language)) {
+    if ((!$sm_language||$default) && isset($squirrelmail_default_language)) {
         $squirrelmail_language = $squirrelmail_default_language;
         $sm_language = $squirrelmail_default_language;
     }