_local language packs take precedence with both forced language and non-forced language settings.

Fixes reopened MDL-8089.
This commit is contained in:
mudrd8mz 2007-02-10 21:54:19 +00:00
parent c327e15031
commit 2f40b60145

View file

@ -34,7 +34,11 @@ if (!empty($file)) {
// Get the list of parent languages. // Get the list of parent languages.
if (empty($forcelang)) { if (empty($forcelang)) {
$langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback $langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback
// _local language packs take precedence } else {
$langs = array($forcelang);
}
// _local language packs take precedence with both forced language and non-forced language settings
$xlangs = array(); $xlangs = array();
foreach ($langs as $lang) { foreach ($langs as $lang) {
if (!empty($lang)) { if (!empty($lang)) {
@ -44,9 +48,7 @@ if (!empty($file)) {
} }
$langs = $xlangs; $langs = $xlangs;
unset($xlangs); unset($xlangs);
} else {
$langs = array($forcelang);
}
// Define possible locations for help file similar to locations for language strings // Define possible locations for help file similar to locations for language strings
// Note: Always retain module directory as before // Note: Always retain module directory as before