Index: branches/REL1_4/phase3/maintenance/InitialiseMessages.inc |
— | — | @@ -10,12 +10,14 @@ |
11 | 11 | * @subpackage Maintenance |
12 | 12 | */ |
13 | 13 | |
| 14 | +require_once('languages/Names.php'); |
14 | 15 | |
15 | | - |
16 | 16 | function initialiseMessages( $overwrite = false, $messageArray = false ) { |
17 | 17 | global $wgContLang, $wgContLanguageCode; |
18 | 18 | global $wgContLangClass, $wgAllMessagesEn; |
19 | 19 | global $wgDisableLangConversion; |
| 20 | + global $wgForceUIMsgAsContentMsg; |
| 21 | + global $wgLanguageNames; |
20 | 22 | global $IP; |
21 | 23 | |
22 | 24 | # overwrite language conversion option so that all variants |
— | — | @@ -51,6 +53,20 @@ |
52 | 54 | } |
53 | 55 | } |
54 | 56 | |
| 57 | + /* |
| 58 | + initialize all messages in $wgForceUIMsgAsContentMsg for all |
| 59 | + languages in Names.php |
| 60 | + */ |
| 61 | + if( is_array( $wgForceUIMsgAsContentMsg ) ) { |
| 62 | + foreach( $wgForceUIMsgAsContentMsg as $uikey ) { |
| 63 | + foreach( $wgLanguageNames as $code => $name) { |
| 64 | + if( $code == $wgContLanguageCode ) |
| 65 | + continue; |
| 66 | + $messages[$uikey. '/' . $code] = $wgContLang->getMessage($uikey); |
| 67 | + } |
| 68 | + } |
| 69 | + } |
| 70 | + |
55 | 71 | initialiseMessagesReal( $overwrite, $messages ); |
56 | 72 | } |
57 | 73 | |