public function getLanguages() {
global $wgHideInterlanguageLinks;
$out = $this->getOutput();
+ $userLang = $this->getLanguage();
# Language links
$language_urls = array();
$ilLangName = $this->formatLanguageName( $ilLangName );
}
+ // CLDR extension or similar is required to localize the language name;
+ // otherwise we'll end up with the autonym again.
+ $ilLangLocalName = Language::fetchLanguageName( $ilInterwikiCode, $userLang->getCode() );
+
$language_urls[] = array(
'href' => $languageLinkTitle->getFullURL(),
'text' => $ilLangName,
- 'title' => $languageLinkTitle->getText(),
+ 'title' => wfMessage( 'tooltip-iwiki', $languageLinkTitle->getText(), $ilLangLocalName )->escaped(),
'class' => $class,
'lang' => wfBCP47( $ilInterwikiCode ),
'hreflang' => wfBCP47( $ilInterwikiCode ),
'editsectionhint',
'help',
'helppage',
+ 'tooltip-iwiki',
'jumpto',
'jumptonavigation',
'jumptosearch',
'red-link-title' => '$1 (page does not exist)',
'sort-descending' => 'Sort descending',
'sort-ascending' => 'Sort ascending',
+'tooltip-iwiki' => '$1 – $2', # only translate this message to other languages if you have to change it
# Short words for each namespace, by default used in the namespace tab in monobook
'nstab-main' => 'Page',
* $1 - page title',
'sort-descending' => 'JavaScript message. Used by sortable table script.',
'sort-ascending' => 'JavaScript message. Used by sortable table script.',
+'tooltip-iwiki' => 'Format of a sidebar interwiki link tooltip. Parameters:
+* $1 - Page name in the target wiki
+* $2 - Target wiki language autonym',
# Short words for each namespace, by default used in the namespace tab in monobook
'nstab-main' => 'The name for the tab of the main namespace. Example: [[Example]]