From 858156a9955728d8923a402c17e9505794f270b0 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 20 Jan 2003 08:06:09 +0000 Subject: [PATCH] Take session language into account when setting locale --- lib/setup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- 2.39.5