Feature from Eloy to set the language to whatever the browser suggests (if the user is not logged in)

This commit is contained in:
moodler
2007-02-12 14:58:44 +00:00
parent afe35ec483
commit ab036ed9ca
2 changed files with 36 additions and 0 deletions
+4
View File
@@ -569,7 +569,11 @@ global $HTTPSPAGEREQUIRED;
$SESSION->lang = $lang.'_utf8';
}
}
setup_lang_from_browser();
unset($lang);
if (empty($CFG->lang)) {
if (empty($SESSION->lang)) {
$CFG->lang = 'en_utf8';