From: moodler <moodler> Date: Mon, 20 Jan 2003 08:06:09 +0000 (+0000) Subject: Take session language into account when setting locale X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=858156a9955728d8923a402c17e9505794f270b0;p=moodle.git Take session language into account when setting locale --- diff --git a/lib/setup.php b/lib/setup.php index dde729cd80..430a45ecbd 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -144,7 +144,9 @@ /// 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");