Index: trunk/extensions/cldr/LanguageNames.body.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | private static function loadLanguage( $code ) { |
62 | 62 | if ( !isset(self::$cache[$code]) ) { |
63 | 63 | |
64 | | - /** Load override for wrong or missing entries in cldr */ |
| 64 | + /* Load override for wrong or missing entries in cldr */ |
65 | 65 | $override = dirname(__FILE__) . '/' . self::getOverrideFileName( $code ); |
66 | 66 | if ( file_exists( $override ) ) { |
67 | 67 | $names = false; |
— | — | @@ -97,5 +97,8 @@ |
98 | 98 | return Language::getFileName( "LocalNames", $code, '.php' ); |
99 | 99 | } |
100 | 100 | |
101 | | - |
| 101 | + public static function coreHook( &$names, $code ) { |
| 102 | + $names += self::getNames( $code, self::FALLBACK_NORMAL, self::LIST_MW_AND_CLDR ); |
| 103 | + return true; |
| 104 | + } |
102 | 105 | } |
Index: trunk/extensions/cldr/cldr.php |
— | — | @@ -22,3 +22,4 @@ |
23 | 23 | $dir = dirname(__FILE__) . '/'; |
24 | 24 | $wgExtensionMessagesFiles['cldr'] = $dir . 'cldr.i18n.php'; |
25 | 25 | $wgAutoloadClasses['LanguageNames'] = $dir . 'LanguageNames.body.php'; |
| 26 | +$wgHooks['LanguageGetTranslatedLanguageNames'][] = 'LanguageNames::coreHook'; |
\ No newline at end of file |