Also on MW 1.35 below is an alternative workaround (which keeps language name as observed by S.piccardi) in form of a modification to Skin.php in patch format (the two replaced lines are noted with '-', and the two lines replacing them are noted with '+'). Note: this works for me, but might break other things, e.g. if you use interwiki links (which I do not use) etc ...
--- original/includes/skins/Skin.php 2022-03-31 21:07:59.044649800 +0000
+++ my.modification/includes/skins/Skin.php 2022-06-16 21:36:54.393564938 +0000
@@ -1363,14 +1363,14 @@ abstract class Skin extends ContextSourc
foreach ( $this->getOutput()->getLanguageLinks() as $languageLinkText ) {
$class = 'interlanguage-link interwiki-' . explode( ':', $languageLinkText, 2 )[0];
- $languageLinkTitle = Title::newFromText( $languageLinkText );
+ $languageLinkTitle = Title::newFromText( explode(':', $languageLinkText, 2)[1] );
if ( !$languageLinkTitle ) {
continue;
}
$ilInterwikiCode = $this->mapInterwikiToLanguage( $languageLinkTitle->getInterwiki() );
- $ilLangName = $langNameUtils->getLanguageName( $ilInterwikiCode );
+ $ilLangName = $langNameUtils->getLanguageName( explode(':', $languageLinkText, 2)[0]);
if ( strval( $ilLangName ) === '' ) {
$ilDisplayTextMsg = $this->msg( "interlanguage-link-$ilInterwikiCode" );