Another little hack to complete the course-level forcelanguage
authormoodler <moodler>
Tue, 10 Feb 2004 08:10:04 +0000 (08:10 +0000)
committermoodler <moodler>
Tue, 10 Feb 2004 08:10:04 +0000 (08:10 +0000)
lib/moodlelib.php

index 7f9364b549c1c62a9f7f84217e4b6e9e07d91607..bda6c8d0abaf87364e48a5e3e7aa7a0590d83433 100644 (file)
@@ -1566,6 +1566,11 @@ function get_string($identifier, $module="", $a=NULL) {
 
     global $CFG;
 
+    global $course;     /// Not a nice hack, but quick
+    if (!empty($course->lang)) {
+        $CFG->courselang = $course->lang;
+    }
+
     $lang = current_language();
 
     if ($module == "") {