// otherwise we'll end up with the autonym again.
$ilLangLocalName = Language::fetchLanguageName( $ilInterwikiCode, $userLang->getCode() );
+ if ( $languageLinkTitle->getText() === '' ) {
+ $ilTitle = wfMessage( 'interlanguage-link-title-langonly', $ilLangLocalName )->text();
+ } else {
+ $ilTitle = wfMessage( 'interlanguage-link-title', $languageLinkTitle->getText(),
+ $ilLangLocalName )->text();
+ }
+
$language_urls[] = array(
'href' => $languageLinkTitle->getFullURL(),
'text' => $ilLangName,
- 'title' => wfMessage( 'interlanguage-link-title', $languageLinkTitle->getText(), $ilLangLocalName )->text(),
+ 'title' => $ilTitle,
'class' => $class,
'lang' => wfBCP47( $ilInterwikiCode ),
'hreflang' => wfBCP47( $ilInterwikiCode ),
'sort-descending' => 'Sort descending',
'sort-ascending' => 'Sort ascending',
'interlanguage-link-title' => '$1 – $2', # only translate this message to other languages if you have to change it
+'interlanguage-link-title-langonly' => '$1', # 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',
Format of a sidebar interwiki link tooltip. Parameters:
* $1 - page name in the target wiki
* $2 - target wiki language autonym',
+'interlanguage-link-title-langonly' => '{{Optional}}
+Format of a sidebar interwiki link tooltip where the target page name is not available. Parameters:
+* $1 - target wiki language autonym',
# Stylesheets
'common.css' => '{{optional}}
'tooltip-preferences-save',
'tooltip-summary',
'interlanguage-link-title',
+ 'interlanguage-link-title-langonly',
),
'stylesheets' => array(
'common.css',