Index: trunk/extensions/I18nTags/I18nTags_body.php |
— | — | @@ -52,14 +52,17 @@ |
53 | 53 | return "<b>$predata$inside</b>$data"; |
54 | 54 | } |
55 | 55 | |
56 | | - public static function languageName( &$parser, $code = '', $native = '' ) { |
| 56 | + public static function languageName( &$parser, $code = '', $outputLanguage = '' ) { |
57 | 57 | global $wgLang; |
58 | 58 | if ( !$code ) { |
59 | 59 | return ''; |
60 | 60 | } |
| 61 | + if ( !$outputLanguage ) { |
| 62 | + $outputLanguage = $wgLang->getCode(); |
| 63 | + } |
61 | 64 | $cldr = is_callable( array( 'LanguageNames', 'getNames' )); |
62 | | - if ( $native !== 'native' && $cldr ) { |
63 | | - $languages = LanguageNames::getNames( $wgLang->getCode(), |
| 65 | + if ( $outputLanguage !== 'native' && $cldr ) { |
| 66 | + $languages = LanguageNames::getNames( $outputLanguage, |
64 | 67 | LanguageNames::FALLBACK_NORMAL, |
65 | 68 | LanguageNames::LIST_MW_AND_CLDR |
66 | 69 | ); |