From: moodler Date: Fri, 26 Sep 2003 08:21:11 +0000 (+0000) Subject: When getting a list of countries, check the parent language if necessary. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=aa3eb050964b354b0df2dee167c461ca0f635f40;p=moodle.git When getting a list of countries, check the parent language if necessary. --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index e5d29bb988..8a57b0350e 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1291,7 +1291,15 @@ function get_list_of_countries() { $lang = current_language(); if (!file_exists("$CFG->dirroot/lang/$lang/countries.php")) { - $lang = "en"; // countries.php must exist in this pack + if ($parentlang = get_string("parentlanguage")) { + if (file_exists("$CFG->dirroot/lang/$parentlang/countries.php")) { + $lang = $parentlang; + } else { + $lang = "en"; // countries.php must exist in this pack + } + } else { + $lang = "en"; // countries.php must exist in this pack + } } include("$CFG->dirroot/lang/$lang/countries.php");