mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
When getting a list of countries, check the parent language if necessary.
This commit is contained in:
parent
5833a6c8eb
commit
aa3eb05096
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user