Skip to content
Browse files

_local language packs take precedence with both forced language and n…

…on-forced language settings.

Fixes reopened MDL-8089.
  • Loading branch information...
1 parent c327e15 commit 2f40b60145d9c4739e3fc9394dad05fdacc00dc4 mudrd8mz committed Feb 10, 2007
Showing with 12 additions and 10 deletions.
  1. +12 −10 help.php
View
22 help.php
@@ -34,19 +34,21 @@
// Get the list of parent languages.
if (empty($forcelang)) {
$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 {
$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
// Note: Always retain module directory as before

0 comments on commit 2f40b60

Please sign in to comment.
Something went wrong with that request. Please try again.