if ($file) {
if ($module == "moodle") {
$langpath = "$CFG->dirroot/lang";
} else {
$langpath = "$CFG->dirroot/mod/$module/lang";
}
if (file_exists("$langpath/$CFG->lang/page/$file")) {
include("$langpath/$CFG->lang/page/$file");
} else {
include("$langpath/en/page/$file");
}
} else {
echo "";
echo $text;
echo "
";
}
?>