mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
_local language packs take precedence with both forced language and non-forced language settings.
Fixes reopened MDL-8089.
This commit is contained in:
parent
c327e15031
commit
2f40b60145
1 changed files with 12 additions and 10 deletions
22
help.php
22
help.php
|
@ -34,20 +34,22 @@ 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
|
|
||||||
$xlangs = array();
|
|
||||||
foreach ($langs as $lang) {
|
|
||||||
if (!empty($lang)) {
|
|
||||||
$xlangs[] = $lang . '_local';
|
|
||||||
$xlangs[] = $lang;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$langs = $xlangs;
|
|
||||||
unset($xlangs);
|
|
||||||
} else {
|
} else {
|
||||||
$langs = array($forcelang);
|
$langs = array($forcelang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// _local language packs take precedence with both forced language and non-forced language settings
|
||||||
|
$xlangs = array();
|
||||||
|
foreach ($langs as $lang) {
|
||||||
|
if (!empty($lang)) {
|
||||||
|
$xlangs[] = $lang . '_local';
|
||||||
|
$xlangs[] = $lang;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$langs = $xlangs;
|
||||||
|
unset($xlangs);
|
||||||
|
|
||||||
|
|
||||||
// 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
|
||||||
$locations = array();
|
$locations = array();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue