]> git.mjollnir.org Git - moodle.git/commitdiff
Take session language into account when setting locale
authormoodler <moodler>
Mon, 20 Jan 2003 08:06:09 +0000 (08:06 +0000)
committermoodler <moodler>
Mon, 20 Jan 2003 08:06:09 +0000 (08:06 +0000)
lib/setup.php

index dde729cd80007d32c778def46c662de55d688020..430a45ecbdc22ea18495f87c60c9b0151cb3c259 100644 (file)
 /// then use the one from the default language.  Otherwise (and this is the 
 /// majority of cases), use the stored locale specified by admin.
 
-    if (!empty($USER->lang) and ($USER->lang != $CFG->lang) ) {
+    if (!empty($SESSION->lang) and ($SESSION->lang != $CFG->lang) ) {
+        $CFG->locale = get_string("locale");
+    } else if (!empty($USER->lang) and ($USER->lang != $CFG->lang) ) {
         $CFG->locale = get_string("locale");
     } else if (empty($CFG->locale)) {
         $CFG->locale = get_string("locale");