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

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil
Interwiki: $wgExtraInterlanguageLinkPrefixes
導入されたバージョン: 1.24.0 (git #7665f7d7)
除去されたバージョン: 使用中
可能な値: 文字列の配列
既定値: array()
他の設定: アルファベット順 | 機能順


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).

$wgInterwikiMagic に 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 InterwikiExtension:Interwiki extension: "demo" for <$1> and "sand" for <$1>.

Now you can set:

$wgExtraInterlanguageLinkPrefixes = array(

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".