]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12570 option to disable lang autodetect from browser; merged from MOODLE_19_STABLE
authorskodak <skodak>
Sat, 15 Dec 2007 13:28:01 +0000 (13:28 +0000)
committerskodak <skodak>
Sat, 15 Dec 2007 13:28:01 +0000 (13:28 +0000)
lang/en_utf8/admin.php
lib/moodlelib.php

index 02154cd9ba256eea4e0b9eea9227651cb4356391..68a2b64aeea78880407d68e4cec3b77e5afc42b3 100644 (file)
@@ -18,6 +18,7 @@ $string['antivirus'] = 'Anti-Virus';
 $string['appearance'] = 'Appearance';
 $string['aspellpath'] = 'Path to aspell';
 $string['authentication'] = 'Authentication';
+$string['autolang'] = 'Language autodetect';
 $string['autologinguests'] = 'Auto-login guests';
 $string['availablelangs'] = 'Available language packs';
 $string['backgroundcolour'] = 'Transparent colour';
@@ -58,6 +59,7 @@ $string['configallowuserthemes'] = 'If you enable this, then users will be allow
 $string['configallusersaresitestudents'] = 'For activities on the front page of the site, should ALL users be considered as students?  If you answer \"Yes\", then any confirmed user account will be allowed to participate as a student in those activities.  If you answer \"No\", then only users who are already a participant in at least one course will be able to take part in those front page activities. Only admins and specially assigned teachers can act as teachers for these front page activities.';
 $string['configvisiblecourses'] = 'Display courses in hidden categories normally';
 $string['configauthenticationplugins'] = 'Please choose the authentication plugins you wish to use and arrange them in order of failthrough.';
+$string['configautolang'] = 'Detect default language from browser setting, if disabled site default is used.';
 $string['configautologinguests'] = 'Should visitors be logged in as guests automatically when entering courses with guest access?';
 $string['configbloglevel'] = 'This setting allows you to restrict the level to which user blogs can be viewed on this site.  Note that they specify the maximum context of the VIEWER not the poster or the types of blog posts.  Blogs can also be disabled completely if you don\'t want them at all.';
 $string['configcachetext'] = 'For larger sites or sites that use text filters, this setting can really speed things up.  Copies of texts will be retained in their processed form for the time specified here.  Setting this too small may actually slow things down slightly,  but setting it too large may mean texts take too long to refresh (with new links, for example).';
index 6481e17755393767ff55a98899ba5179e96cf569..bd35af2f3d5bbd10cb30b598c708f9bb021f8751 100644 (file)
@@ -7697,7 +7697,7 @@ function setup_lang_from_browser() {
 
     global $CFG, $SESSION, $USER;
 
-    if (!empty($SESSION->lang) or !empty($USER->lang)) {
+    if (!empty($SESSION->lang) or !empty($USER->lang) or empty($CFG->autolang)) {
         // Lang is defined in session or user profile, nothing to do
         return;
     }