}
}
- include("$CFG->dirroot/lang/$lang/countries.php");
+ include_once("$CFG->dirroot/lang/$lang/countries.php");
asort($string);
return $string;
}
+function get_list_of_pixnames() {
+/// Returns a list of picture names in the current language
+ global $CFG;
+
+ $lang = current_language();
+
+ if (!file_exists("$CFG->dirroot/lang/$lang/pix.php")) {
+ if ($parentlang = get_string("parentlanguage")) {
+ if (file_exists("$CFG->dirroot/lang/$parentlang/pix.php")) {
+ $lang = $parentlang;
+ } else {
+ $lang = "en"; // countries.php must exist in this pack
+ }
+ } else {
+ $lang = "en"; // countries.php must exist in this pack
+ }
+ }
+
+ include_once("$CFG->dirroot/lang/$lang/pix.php");
+
+ return $string;
+}
+
function document_file($file, $include=true) {
/// Can include a given document file (depends on second
/// parameter) or just return info about it