Open GoogleCodeExporter opened 9 years ago
I am not an expert on Moodleness - but this is the code I came up with for
Locale:
$locale = $COURSE->lang;
if ( strlen($locale) < 1 ) $locale = $CFG->lang;
Comments?
Original comment by drchuck
on 6 Mar 2010 at 10:25
Shouldn't the the order of locale precedence be:
1. Course (forced)
2. User
3. System
?
I modded our local code to this:
$locale = $course->lang;
if ( strlen($locale) < 1 ) {
// The course language is not enforced. Use the user's profile setting.
$locale = $USER->lang;
if ( strlen($locale) < 1 ) {
// No language specced for user. Use the default.
$locale = $CFG->lang;
}
}
Which seems to do the job.
Adrian.
Original comment by adrian.r...@gmail.com
on 22 Feb 2012 at 10:08
Has there been any assessment of this? It doesn't seem right to skip the user's
language prefs and just go straight to the default. Do I need to open a new
ticket?
Original comment by adrian.r...@gmail.com
on 25 May 2012 at 10:56
Original issue reported on code.google.com by
drchuck
on 6 Mar 2010 at 9:51