Now uses real current language (may not be the same as $CFG->lang)

This commit is contained in:
moodler 2002-10-13 10:06:01 +00:00
parent a5e1f35c66
commit 5c0ee23cc3

View File

@ -10,6 +10,8 @@
optional_variable($text, "No text to display");
optional_variable($module, "moodle");
$lang = current_language();
print_header();
if (ereg("\\.\\.", $file)) {
@ -18,9 +20,9 @@
if ($file) {
if ($module == "moodle") {
$filepath = "$CFG->dirroot/lang/$CFG->lang/help/$file";
$filepath = "$CFG->dirroot/lang/$lang/help/$file";
} else {
$filepath = "$CFG->dirroot/lang/$CFG->lang/help/$module/$file";
$filepath = "$CFG->dirroot/lang/$lang/help/$module/$file";
}
if (file_exists("$filepath")) {