Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgExtraInterlanguageLinkPrefixes and the translation is 10% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎日本語
Interwiki: $wgExtraInterlanguageLinkPrefixes
Array of interwiki prefixes to be treated as language links.
Introduzida na versão:1.24.0 (git #7665f7d7)
Removida na versão:ainda em uso
Valores permitidos:array of strings
Valor por omissão:array()
Outras configurações: Lista Alfabética | Lista por Função


By default, $wgInterwikiMagic only treats interwiki links as interlanguage links (i.e. moved to the "Languages" section of the sidebar) if the interwiki prefix matches one of the ISO language codes known to MediaWiki. From time to time, you may need to set up extra prefixes that are to be treated as interlanguage links (e.g. "mul" for a multilingual site).

This setting is ignored if $wgInterwikiMagic is not set to true.

To set the display text for the interlanguage links generated by this code, you need to create "MediaWiki:Interlanguage-link-foo", where "foo" is the interwiki prefix. To provide a friendly site name for the link title text, use "MediaWiki:Interlanguage-link-sitename-foo".

Information about extra language links (in the site language only) is provided via the API in "meta=siteinfo&prop=interwikimap".


Assume that there are three wikis, one holding the documentation, one containing demonatrations and one is serveing as a sandbox.

In a first step you add the interwiki prefix for the demonstration and the sandbox wiki to the documentation wiki using e.g. the Interwiki extension: "demo" for <$1> and "sand" for <$1>.

Now you can set:

$wgExtraInterlanguageLinkPrefixes = [

This allows you to add [[demo:Demo for xyz-setting]] and [[sand:Sandbox for xyz setting]] to a wiki page. The wiki will now render "demo:Demo for xyz-setting" as well as "sand:Sandbox for xyz setting" in the sidebar and link to <> and <> respectively.

To add a link label for "demo:Demo for xyz-setting" as well as "sand:Sandbox for xyz setting" you can now edit the system message "MediaWiki:Interlanguage-link-demo" and add "Demonstration" as well as "MediaWiki:Interlanguage-link-sand" and add "Sandbox" on the documentation wiki. As a result the links will render as "Demonstration" and "Sandbox" respectively.

To enhance the popup label when you hover over the "Demonstration" link as well as the "Sandbox" link you can now on the documentation wiki edit the system message "MediaWiki:Interlanguage-link-sitename-demo" and add "Demonstration wiki" as well as "MediaWiki:Interlanguage-link-sitename-sand" and add "Sandbox wiki". As a result the popups will render as "Demo for xyz-setting - Demonstration wiki" and "Sandbox for xyz setting - Sandbox wiki" respectively instead of just "Demo for xyz-setting" and "Sandbox for xyz setting".

Since you are not linking to different language versions of your wiki you can now edit system message "MediaWiki:Otherlanguages" and change it from "In other languages" to e.g. "Related wiki pages".