* Extend language::getLanguageName to return localized language names if available
[lhc/web/wiklou.git] / includes / SkinTemplate.php
index f44c655..f61104f 100644 (file)
@@ -416,8 +416,13 @@ class SkinTemplate extends Skin {
                                if ( $nt ) {
                                        $language_urls[] = array(
                                                'href' => $nt->getFullURL(),
-                                               'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l),
-                                               'class' => $class
+                                               'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != ''
+                                                       ? $wgContLang->getLanguageName( $nt->getInterwiki() )
+                                                       : $l ),
+                                               'class' => $class,
+                                               'title' => ( $wgLang->getLanguageNameLocalized( $nt->getInterwiki() ) != ''
+                                                       ? $wgLang->getLanguageNameLocalized( $nt->getInterwiki() )
+                                                       : $l )
                                        );
                                }
                        }