Help:Interwiki linking on Wikimedia wikis: Difference between revisions

Content deleted Content added
Translation tweaks.
 
(33 intermediate revisions by 11 users not shown)
Line 1:
<{{languages/>}}
{{hatnote|For information not specific to Wikimedia wikis, see [[mw:Manual:Interwiki]] and [[mw:Help:Interwiki linking]]}}
{{H:h}}
<translate>
By adding a prefix to another [[<tvar name="1">Special:MyLanguage/Wikimedia projects</tvar>|project]], internal link style ("prefixed internal link style") can be used to [[<tvar name="2">Special:MyLanguage/Help:Link</tvar>|link]] to a page of another project. A system of shorthand link labels are used to refer to different projects, in the context of interproject linking, as seen within the actual source text. For example, <tvar name="3"><code>en:</code></tvar> refers to the English Wikipedia. This is seen in <tvar name="4"><code><nowiki>[[:en:Apple]]</nowiki></code></tvar>, which produces <tvar name="5">[[:en:Apple]]</tvar>, a link to the English Wikipedia article on "<tvar name="6">Apple</tvar>".
 
By adding a prefix to another [[Wikimedia projects|project]], internal link style ("prefixed internal link style") can be used to [[Help:Link|link]] to a page of another project. A system of shorthand link labels are used to refer to different projects, in the context of interproject linking, as seen within the actual source text. For example, <code>en:</code> refers to the English Wikipedia. This is seen in <code><nowiki>[[:en:Apple]]</nowiki></code>, which produces [[:en:Apple]], a link to the English Wikipedia article on "Apple".
This is called interwiki. For each project, an [[<tvar name="1">Special:MyLanguage/Interwiki map</tvar>|interwiki map]] (a list of target projects with their prefixes) is specified. These target projects need not use MediaWiki and need not even be a wiki.
 
This is called "interwiki linking". The precise interwiki links used vary slightly for each project, and can be seen at [[Special:Interwiki]].
== Interwiki linking from and within Wikimedia ==
 
== Interwiki linking from and within Wikimedia ==
Within Wikimedia, for the purpose of [[w:Help:Interlanguage links|interlanguage links]] (see below), the project families are Wikipedia, Wiktionary, Wikiquote, Wikibooks and Wikisource. Thus, this applies for a link like <tvar name="1">en:</tvar>, <tvar name="2">de:</tvar>, etc., from a Wikipedia to another one, from a Wiktionary to another one, from a Wikiquote to another one, from a Wikibooks to another one or from a Wikisource to another one.
Within [[m:Wikimedia|Wikimedia]], for the purpose of interlanguage links (see below), the project families are Wikipedia, Wiktionary, Wikiquote, Wikibooks and Wikisource. Thus, this applies for a link like en:, de:, etc., from a Wikipedia to another one, from a Wiktionary to another one, from a Wikiquote to another one, from a Wikibooks to another one or from a Wikisource to another one.
 
Most of the time, interwiki links are handled by [[Wikidata]] instead, but the manual interwiki link syntax still works and is useful in edge cases.
The interlanguage link feature works on Wikimedia Commons and produces links to the Wikipedias. This is not reciprocal, a link from a Wikipedia to Commons is an in-page link.
 
=== Project titles and shortcuts ===
This list is incomplete. See [[Special:Interwiki]] for a full list of valid interwiki links.
</translate>
<section begin=iwl-tables />
{| class="wikitable sortable" style="margin-bottom:0 ; margin-right:2em; display:inline-table;"
! Project !! Long form !! Shortcut
! <translate>Project</translate>
! <translate>Long form</translate>
! <translate>Shortcut</translate>
|-
| {{ll|[[Wikipedia}}|<b>W</b>ikipedia]]
| <code>[[[[w:|wikipedia:]]]]</code>
| <code>[[[[w:]]]]</code>
|-
| {{ll|[[Wiktionary}}|<b>Wikt</b>ionary]]
| <code>[[[[wiktionary:]]]]</code>
| <code>[[[[wikt:]]]]</code>
|-
| {{ll|[[Wikinews}}|Wiki<b>n</b>ews]]
| <code>[[[[wikinews:]]]]</code>
| <code>[[[[n:]]]]</code>
|-
| {{ll|[[Wikibooks}}|Wiki<b>b</b>ooks]]
| <code>[[[[wikibooks:]]]]</code>
| <code>[[[[b:]]]]</code>
|-
| {{ll|[[Wikiquote}}|Wiki<b>q</b>uote]]
| <code>[[[[wikiquote:]]]]</code>
| <code>[[[[q:]]]]</code>
|-
| {{ll|[[Wikisource}}|Wiki<b>s</b>ource]]
| <code>[[[[wikisource:]]]]</code>
| <code>[[[[s:]]]]</code>
|-
| {{ll|[[Wikisource}}]] (<translate>multilingual &nbsp;pages</translate>)
| <code>[[[[oldwikisource:]]]]</code>
|<code>[[[[s:mul:]]]]</code>
|
|-
| {{ll|[[Wikispecies}}|Wiki<b>species</b>]]
| <code>[[[[wikispecies:]]]]</code>
| <code>[[[[species:]]]]</code>
|-
| {{ll|[[Wikiversity}}|Wiki<b>v</b>ersity]]
| <code>[[[[wikiversity:]]]]</code>
| <code>[[[[v:]]]]</code>
|-
| {{ll|[[Wikivoyage}}|Wiki<b>voy</b>age]]
| <code>[[[[wikivoyage:]]]]</code>
| <code>[[[[voy:]]]]</code>
|-
| {{ll|[[Wikimedia Foundation}}|<b>W</b>iki<b>m</b>edia <b>F</b>oundation]]
| <code>[[[[wikimedia:]]]]</code><br /><code>[[[[foundation:]]]]</code>
| <code>[[[[wmf:]]]]</code>
|-
| {{ll|[[Wikimedia Commons}}|Wikimedia <b>C</b>ommons]]
| <code>[[[[commons:]]]]</code>
| <code>[[[[c:]]]]</code>
|-
| [[Specialm:MyLanguage/Meta:About|<translate>Wikimedia Meta-Wiki<b>M</translateb>eta-Wiki]]
|| <code>[[[[metawiki:]]]]</code><br/><!--
--><code>[[[[metawikimedia:]]]]</code><br/><!--
Line 75 ⟶ 72:
| <code>[[[[m:]]]]</code>
|-
| {{ll[[m:Wikimedia Incubator|Wikimedia Incubator}}]]
| <code>[[[[incubator:]]]]</code>
|
|-
| [[Specialm:MyLanguage/Strategy/Wikimedia movement/2010-2015|<translate>Wikimedia Strategic Planning</translate>]]
| <code>[[[[strategy:]]]]</code>
|
|-
| {{ll|[[MediaWiki}}|<b>M</b>edia<b>W</b>iki]]
| <code>[[[[mediawikiwiki:]]]]</code>
| <code>[[[[mw:]]]]</code>
|-
| [[Special:MyLanguage/Bugzilla|<translate>MediaZilla / Bugzilla</translate>]]
| <code>[[[[mediazilla:]]]]</code><br /><code>[[[[bugzilla:]]]]</code>
|
|-
| {{ll|[[m:Phabricator}}|<b>Phab</b>ricator]]
| <code>[[[[phabricator:]]]]</code>
| <code>[[[[phab:]]]]</code>
|-
| [[m:Testwiki|Testwiki]]
| [[Special:MyLanguage/Wikimedia wikis#Test wikis#Testwiki|<translate>Test Wiki</translate>]]
| <code>[[[[testwiki:]]]]</code>
|
|-
| {{ll|[[Wikidata}}|Wiki<b>d</b>ata]]
| <code>[[[[wikidata:]]]]</code>
| <code>[[[[d:]]]]</code>
|-
| [[Wikifunctions|Wiki<b>f</b>unctions]]
| <code>[[[[wikifunctions:]]]]</code>
| <code>[[[[f:]]]]</code>
|-
| [[wikitech:|Wikitech]]
Line 112 ⟶ 113:
|}
{| class="wikitable sortable" style="margin-bottom:0; display:inline-table;"
! <translate>International chapters</translate> !! Shortcut
! <translate>Shortcut</translate>
|-
| <translate>Argentina</translate>
| <code>[[[[wmar:]]]]</code>
|-
| <translate>Australia</translate>
| <code>[[[[wmau:]]]]</code>
|-
| <translate>Bangladesh</translate>
| <code>[[[[wmbd:]]]]</code>
|-
| <translate>Belgium</translate>
| <code>[[[[wmbe:]]]]</code>
|-
| Brazil
| <translate>Canada</translate>
| <code>[[[[wmbr:]]]]</code>
|-
| Canada
| <code>[[[[wmca:]]]]</code>
|-
| <translate>Czech Republic</translate>
| <code>[[[[wmcz:]]]]</code>
|-
| <translate>Denmark</translate>
| <code>[[[[wmdk:]]]]</code>
|-
| <translate>Germany</translate>
| <code>[[[[wmde:]]]]</code>
|-
| <translate>Finland</translate>
| <code>[[[[wmfi:]]]]</code>
|-
| <translate>Hong Kong</translate>
| <code>[[[[wmhk:]]]]</code>
|-
| <translate>Hungary</translate>
| <code>[[[[wmhu:]]]]</code>
|-
| <translate>India</translate>
| <code>[[[[wmin:]]]]</code>
|-
| <translate>Indonesia</translate>
| <code>[[[[wmid:]]]]</code>
|-
| <translate>Israel</translate>
| <code>[[[[wmil:]]]]</code>
|-
| <translate>Italy</translate>
| <code>[[[[wmit:]]]]</code>
|-
| Netherlands
| <translate>North Macedonia</translate>
| <code>[[[[wmmk:]]]]</code>
|-
| <translate>Netherlands</translate>
| <code>[[[[wmnl:]]]]</code>
|-
| North Macedonia
| <translate>Norway</translate>
| <code>[[[[wmmk:]]]]</code>
|-
| Norway
| <code>[[[[wmno:]]]]</code>
|-
| <translate>Poland</translate>
| <code>[[[[wmpl:]]]]</code>
|-
| <translate>Russia</translate>
| <code>[[[[wmru:]]]]</code>
|-
| <translate>Serbia</translate>
| <code>[[[[wmrs:]]]]</code>
|-
| <translate>Spain</translate>
| <code>[[[[wmes:]]]]</code>
|-
| <translate>Sweden</translate>
| <code>[[[[wmse:]]]]</code>
|-
| <translate>Switzerland</translate>
| <code>[[[[wmch:]]]]</code>
|-
| <translate>Taiwan</translate>
| <code>[[[[wmtw:]]]]</code>
|-
| <translate>Ukraine</translate>
| <code>[[[[wmua:]]]]</code>
|-
| <translate>United Kingdom</translate>
| <code>[[[[wmuk:]]]]</code>
|}
 
* <translate>Other current Wikimedia prefixes:</translate> [[betawikiversity:]] (shortform: [[v:mul:]]), [[download:]], [[dbdump:]], [[gerrit:]], [[mail:]], [[mailarchive:]], [[outreach:]], [[otrs:]], [[OTRSwiki:]], [[quality:]], [[spcom:]], [[ticket:]], [[tools:]], [[tswiki:]], [[svn:]], [[sulutil:]] [[rev:]], [[wmania:]]</span>, [[wm2016:]], [[wm2017:]].
<section end=iwl-tables />
* <translate>See a complete list of current and old but still working prefixes for all Wikimedia wikis at the [[<tvar name="1">foundation:Special:SiteMatrix</tvar>|Wikimedia SiteMatrix]].</translate>
 
<section begin=iwl-text />
The '''long forms''' are sometimes overwritten by namespaces with the same name. For example <tt><nowiki>[[meta:]]</nowiki></tt> prefers to the Project namespace instead on Meta. The '''shortcuts''' should work everywhere.
<translate>
Some of the '''long forms''' don't work as expected within the same project; for example <tvar name="1"><code><nowiki>[[meta:]]</nowiki></code></tvar> doesn't work on Meta, while <tvar name="2"><code><nowiki>[[metawikipedia:]]</nowiki></code></tvar> does. This depends on the configuration of the wiki and where the names are stored (see also next paragraph). The '''shortcuts''' work everywhere. ''(That is the intention; currently (16-Jan-2007), it does not work on all projects.)''
 
The [[<tvar name="1">Specialm:MyLanguage/Interwiki map</tvar>|interwiki map]] on Meta lists many prefixes, among others, <tvar name="2"><codett><nowiki>[[wikipedia:]]</nowiki></code></tvartt> for the English Wikipedia, working from any Wiki supporting the Meta interwiki map, not(except onlyfor fromWikipedias MediaWikithat wikis.use Someit prefixes work only withas a page,project for example: <tvar name="3">[[wikipediawikipedia:]]</tvar> (failsnamespace) vs. <tvar name="4">[[wikipediawikipedia:Interwikimedia link]]</tvar> (works). These prefixes are case insensitive.
</translate>
<!-- This template needs fixing:
One-letter prefixes (as a live check on the table): {{for loop|call=If interwiki link show||a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z}}
-->
<translate>
The shortcuts are just interwikis with different histories. Wikipedia, Wikiquote etc. point to the English versions and are also included in the standard MediaWiki interwiki table (IIRC); <tvar name="1">w</tvar>, <tvar name="2">q</tvar>, <tvar name="3">b</tvar>, <tvar name="4">wikt</tvar> etc. are used like interlanguage wikilinks to link to the sisterproject in the same language (so <tvar name="5">[[w:it:b:]]</tvar> is equivalent to <tvar name="6">[[Wikibooks:it:]]</tvar>).
 
The shortcuts have different histories. Wikipedia, Wikiquote etc. point to the English versions via an entry in [[m:Interwiki map]], and are also included in [https://phabricator.wikimedia.org/source/mediawiki/browse/master/maintenance/interwiki.list the standard MediaWiki interwiki table]; w, q, b, wikt etc. are used like interlanguage wikilinks to link to the sisterproject in the same language (so [[w:it:b:]] is equivalent to [[Wikibooks:it:]]), and are hardcoded rather than part of [[interwiki map]].
Non-Wikimedia interwiki codes have a limitation, that they can only be used through a link. For example, the entry for "<tvar name="1">[[wikt:John|John]]</tvar>" on Wiktionary, a Wikimedia project, can be accessed by <tvar name="2"><code><nowiki>[[wikt:John]]</nowiki></code></tvar> or <tvar name="3">https://meta.wikimedia.org/wiki/wikt:John</tvar>. However, the latter method does not work for non-Wikimedia wikis. For example, the main page on the Mozilla Wiki can be accessed via <tvar name="4"><code><nowiki>[[MozillaWiki:Main Page]]</nowiki></code></tvar>, but <tvar name="5">https://meta.wikimedia.org/wiki/MozillaWiki:Main_Page</tvar> results in an error. In these cases, Special:Search can be used (<tvar name="6">https://meta.wikimedia.org/wiki/Special:Search/MozillaWiki:Main_Page</tvar>). You can see [[<tvar name="7">Special:Interwiki</tvar>|the Interwiki special page]] for a list of "forward" and "non-forward" prefixes.
</translate>
<section end=iwl-text />
 
Non-Wikimedia interwiki codes have a limitation, that they can only be used through a link. For example, the entry for "[[wikt:John|John]]" on Wiktionary, a Wikimedia project, can be accessed by <tt><nowiki>[[wikt:John]]</nowiki></tt> or http://meta.wikimedia.org/wiki/wikt:John. However, the latter method does not work for non-Wikimedia wikis. For example, the main page on the Mozilla Wiki can be accessed via <tt><nowiki>[[MozillaWiki:Main Page]]</nowiki></tt>, but http://meta.wikimedia.org/wiki/MozillaWiki:Main_Page results in an error. In these cases, Special:Search can be used (http://meta.wikimedia.org/wiki/Special:Search/MozillaWiki:Main_Page). You can see [[m:Special:Interwiki|the Interwiki special page]] for a list of "forward" and "non-forward" prefixes.
<translate>
<section end=iwl-text />
=== Interwiki links on other sites ===
 
Other MediaWiki installations will support different interwiki prefixes.
 
You may be able to use the [[<tvar name="1">mw:Special:MyLanguage/API:Siteinfo</tvar>|MediaWiki API]] to query for a site's available interwiki prefixes.
Try replacing the <tvar name="2"><code>index.php?''stuff''</code></tvar> on the end of an edit or history URL with <tvar name="3"><code>api.php?action=query&meta=siteinfo&siprop=interwikimap</code></tvar>.
 
== Technical ==
A project's namespace prefix cannot be reused as code for an external project. However, the prefix used for a target project may coincide with the prefix for a project namespace, within that project.
You can't use one project's namespace prefix in another project's codebase because it might match a namespace within that same project. For example, [[MediaWiki:Sidebar]] exists on MetaWiki, Wikibooks, and MediaWiki.
So, when you're linking to a page in that namespace, add the project prefix, like this: [[MetaWiki:MediaWiki:Sidebar]], [[Wikibooks:MediaWiki:Sidebar]], or [[Mediawikiwiki:MediaWiki:Sidebar]].
 
When dealing with pages whose title begins with the projects prefix but the page is internal, for example [[Wikibooks:What is Wikibooks?]], keep things consistent across projects by adding the projects prefix again. It becomes, [[Wikibooks:Wikibooks:What is Wikibooks?]].
A project's own namespace prefix cannot be reused as code for an external project. However, the prefix used for a target project may coincide with the prefix for a project namespace, within that project. As a result, to link to a page in that namespace, use the same prefix twice, for example: <tvar name="1">[[en:Wikisource:Wikisource:Scriptorium]]</tvar>.
 
In the first example the <code>Wikibooks:</code> prefix gets in the way of recognizing <code>Wikibooks:</code> as a namespace in Wikibooks. But in MetaWiki, adding <code>Wikibooks:</code> makes the link to be treated as an interwiki prefix rather than a namespace, this allows links to be redirected to another project.
For portability across projects, one may want to select a link code that leads to the same target from all projects, for example: <tvar name="1">[[MetaWikipedia:wikibooks:Main Page]]</tvar>. The "<tvar name="2">superfluous</tvar>" "<tvar name="3">MetaWikipedia:</tvar>" prevents "<tvar name="4">wikibooks:</tvar>" being interpreted as namespace prefix, when the code is used at wikibooks itself, while at Meta the "<tvar name="3">MetaWikipedia:</tvar>" is ignored (it is not a namespace prefix and even at Meta itself, it is recognized as code for Meta). The codes above work from all projects; however, the [[<tvar name="5">Special:MyLanguage/Help:Link#Wikilinks</tvar>|existence detection]] and the [[<tvar name="6">Special:MyLanguage/Help:Self link</tvar>|self-link feature]] do not work on interwiki links.
 
=== Prefixes ===
Interwiki links can use prefixes for the '''project''' and/or for the '''language'''. Without the prefix, links are local, for pages in the same project and the same language. If only a language is given, they go to a page in the same (or similar) project for the specified language. If a language is given on a multilingual wiki, it will go to the Wikipedia of the given language:
 
Interwiki links can use prefixes for the '''project''' and/or for the '''language'''. Without the prefix, links are local, for pages in the same project and the same language. If only a language is given, they go to a page in the same (or similar) project for the specified language:
</translate>
<nowiki>[[:fr:]]</nowiki> [[:fr:]]
<nowiki>[[:os:]]</nowiki> [[:os:]]
 
<translate>
If only the project is specified, they typically go to the specified project in the corresponding language of the source, see above. At most, two prefixes are needed for pages in any existing project and any supported language. If a project is given on a multilingual wiki, it will go to the English version of the project:
 
</translate>
<nowiki>[[s:de:Hauptseite]]</nowiki> [[s:de:Hauptseite]]
<nowiki>[[b:en:Main page]]</nowiki>&#160; [[b:en:Main page]]
<nowiki>[[n:en:Main page]]</nowiki> &#160; [[n:en:Main page]]
 
<translate>
If the language is different, specifying it before the project can also work. However, this is '''discouraged''', as it may not function as expected on some projects:
 
</translate>
<nowiki>[[:de:q:Hauptseite]]</nowiki> [[:de:q:Hauptseite]] (not recommended)
<nowiki>[[:en:n:Main page]]</nowiki>&#160; [[:en:n:Main page]] (not recommended)
 
<translate>
More than two prefixes are generally unnecessary, the following examples should work everywhere:
 
</translate>
<nowiki>[[m:Help:Help]]</nowiki> [[m:Help:Help]]
<nowiki>[[w:Interwiki]]</nowiki> [[w:Interwiki]]
 
<translate>
Two prefixes can have unexpected effects, for example, from [[m:|Meta]], the following links end up on
different pages:
 
</translate>
<nowiki>[[m:en:About]]</nowiki>&#160; [[m:en:About]]
<nowiki>[[:en:m:About]]</nowiki> [[:en:m:About]]
<nowiki>[[m:About]]</nowiki> &#160; &#160; [[m:About]]
<translate>
In the first case Meta ignores the <tvar name="1"><code>m:</code></tvar>, because it is local and then, interprets <tvar name="2"><code>en:</code></tvar> as <tvar name="3"><code>w:en:</code></tvar>, the prefix for the [[<tvar name="4">w:en:About</tvar>|English Wikipedia]]. In the second case, the leading <tvar name="2"><code>en:</code></tvar> goes to the English Wikipedia, where the following <tvar name="1"><code>m:</code></tvar> goes straight back to Meta.
 
In the first case [[m:|Meta]] ignores the <code>m:</code>, because it is local and then, interprets
In other words, multiple prefixes are evaluated left to right by the relevant Wikimedia servers (project and language). For projects without different languages, like Meta (because Meta is multilingual by itself), language prefixes can be handled as shorthands for <tvar name="1"><code>w:</code></tvar> plus the specified language:
<code>en:</code> as <code>w:en:</code>, the prefix for the [[w:en:About|English Wikipedia]]. In the second case, the leading <code>en:</code> goes to the English Wikipedia, where the following <code>m:</code> goes straight back to [[m:About|Meta]].
</translate>
 
In other words, multiple prefixes are evaluated left to right by the relevant Wikimedia servers (project and language). For projects without different languages, like [[m:|Meta]] (because Meta is
multilingual by itself), language prefixes can be handled as shorthands for <code>w:</code> plus the specified language:
 
<nowiki>[[:pl:2006]]</nowiki> &#160; [[:pl:2006]]
<nowiki>[[w:pl:2006]]</nowiki>&#160; [[w:pl:2006]]
<nowiki>[[:pl:w:2006]]</nowiki> [[:pl:w:2006]]
<translate>
From Meta, the first two links both arrive at the Polish 2006 page. The third arrives at the English Wikipedia, because that's how the server selected by <tvar name="1"><code>:pl:</code></tvar> interprets the second prefix <tvar name="2"><code>w:</code></tvar>.
 
From [[m:|Meta]], the first two links both arrive at the Polish 2006 page. The third arrives at the English [[w:|Wikipedia]], because that's how the server selected by <code>:pl:</code> interprets the second prefix <code>w:</code>.
For a portable link on that server, it would be a bad idea to use <tvar name="1"><code>w:</code></tvar>, but <tvar name="2"><code>:pl:</code></tvar> does the trick. To test that effect from Meta, the following links should go to the same page:
 
</translate>
For a portable link on that server, it would be a bad idea to use <code>w:</code>, but <code>:pl:</code> does the trick. To test that effect from [[m:|Meta]], the following links should go to the same page:
 
<nowiki>[[:ja:2006]]</nowiki> &#160;&#160; [[:ja:2006]]
<nowiki>[[:ja:ja:2006]]</nowiki> [[:ja:ja:2006]]
 
<translate>
A universal interwiki link, that is, one that works no matter from which Wikimedia wiki, can be written <tvar name="1"><nowiki>[[m:</nowiki>''project'':''language'':''page name'']]</tvar> (e.g. <tvar name="2">[[m:b:nl:Wiskunde]]</tvar>); this routes the parsing of the links via Meta ([[bugzilla:4285|bug 4285]]).
 
=== Portable links ===
 
In short, if you want the links to always work in the same way, always use <tvar name="1"><code><nowiki>[[</nowiki>'''m:'''<nowiki>Example]]</nowiki></code></tvar> to link to anything on Meta-Wiki; always use <tvar name="2"><code><nowiki>[[</nowiki>'''w:en:'''<nowiki>Example]]</nowiki></code></tvar> to link to anything on English Wikipedia; always use <tvar name="3"><code><nowiki>[[</nowiki>'''q:de:'''<nowiki>Beispiel]]</nowiki></code></tvar> to link to anything on German Wikiquote.
 
=== Non-local interwikis ===
Technically, an interwiki [[mw:Manual:Interwiki table|defined as local]] is one which always "forwards" to the destination: such interwikis can always be concatenated. The examples above work because all those interwikis are local in all those wikis. Interwikis which are not local in the wiki where they're concatenated or used directly won't work.
 
Technically, an interwiki [[<tvar name="1">mw:Special:MyLanguage/Manual:Interwiki table</tvar>|defined as local]] is one which always "forwards" to the destination: such interwikis can always be concatenated. The examples above work because all those interwikis are local in all those wikis. Interwikis which are not local in the wiki where they're concatenated or used directly won't work.
 
The following works:
</translate>
<nowiki>[[MeatBall:AssumeGoodFaith]]</nowiki> &#160;&#160; [[MeatBall:AssumeGoodFaith]]
 
<translate>
All these don't ("Bad title" error):
 
</translate>
<nowiki>[[w:MeatBall:AssumeGoodFaith]]</nowiki> &#160;&#160; [[w:MeatBall:AssumeGoodFaith]]
<nowiki>https://meta.wikimedia.org/wiki/MeatBall:AssumeGoodFaith</nowiki> &#160;&#160; https://meta.wikimedia.org/wiki/MeatBall:AssumeGoodFaith
<nowiki>https://en.wikipedia.org/wiki/MeatBall:AssumeGoodFaith</nowiki> &#160;&#160; https://en.wikipedia.org/wiki/MeatBall:AssumeGoodFaith
 
<translate>
Non-local interwiki links will still work if you type them in the search bar and choose "go".
 
== Fandom ==
In [[w:en:Fandom|Fandom]], the prefix is the ''internal'' project name for some older wikis. For others, "<tvar name="1">wikia:c:</tvar>" is added in front (e.g. <tvar name="2"><code>[&#91;wikia:c:psychology&#93;]</code></tvar> or shorter <tvar name="3"><code>[&#91;w:c:trains:locomotive&#93;]</code></tvar>). (The "<tvar name="4">c</tvar>" is for "<tvar name="5">city</tvar>", a legacy of Fandom's original name ''Wikicities''.)
 
Note that <tvar name="1">w:</tvar> only points to <tvar name="2">wikia:</tvar> from other wikis on that same site; on Wikimedia projects, <tvar name="1">w:</tvar> is the Wikipedia in the same language as the local wiki.
 
''From Wikimedia projects'', use <tvar name="1"><code>[&#91;wikiasite:psychology&#93;]</code></tvar>, giving <tvar name="2">[[wikiasite:psychology]]</tvar>; <tvar name="3"><code>[&#91;wikia:trains:locomotive&#93;]</code></tvar>, giving <tvar name="4">[[wikia:trains:locomotive]]</tvar>.
</translate>
''<translate>Don't confuse this with <tvar name="1">[[wikia:c:Community Central]]</tvar> and other pages on the Community Central wiki.</translate>''<!-- {{lcfirst:Wikia}} is the official name for Wikis hosted by {{ucfirst:Wikia}} -->
<translate>
== Interlanguage links ==
:''For a complete list of current languages and language codes, see: [[w:List of Wikipedias]]''
</translate>
 
:''<translate>For a complete list of current languages and language codes, see[[w:List of Wikipedias]].</translate>''
For a multilingual family of similar projects, with one project per language, a system for '''interlanguage linking''' can be set up, setting [[mw:Manual:$wgInterwikiMagic|$wgInterwikiMagic]] to true and [[mw:Manual:$wgHideInterlanguageLinks|$wgHideInterlanguageLinks]] to false. If this project is in a family for which this applies, [[Help:Interlanguage link demo]] may demonstrate what is explained below (this depends on whether the same language codes are used).
<translate>
For a multilingual family of similar projects, with one project per language, a system for '''interlanguage linking''' can be set up, setting <tvar name="1">[[mw:Special:MyLanguage/Manual:$wgInterwikiMagic|$wgInterwikiMagic]]</tvar> to <tvar name="2">true</tvar> and <tvar name="3">[[mw:Special:MyLanguage/Manual:$wgHideInterlanguageLinks|$wgHideInterlanguageLinks]]</tvar> to <tvar name="4">false</tvar>. If this project is in a family for which this applies, <tvar name="5">{{ll|Help:Interlanguage link demo}}</tvar> may demonstrate what is explained below (this depends on whether the same language codes are used).
 
An interwiki link within the family is treated differently, unless it is on a talk page of any namespace. It appears at one or two edges of the webpage (left in Monobook, top and bottom in Classic).
 
Thus, an interlanguage link is mainly suitable for linking to the most closely ''corresponding'' page in another language. It is not suitable for multiple links of the same other language. See <tvar name="1">'''{{ll|[[Interlanguage use case}}]]'''</tvar> for a discussion of common troubles with this system and other possible implementations.
 
The feature can also be used on an image description page, to link to the same or a similar image in a sister project. Other interwiki links to images require the prefixed colon.
 
Note that, if a page may be used as a [[<tvar name="1">Specialmw:MyLanguage/Help:Template</tvar>|template]] (even if it is not in the template namespace), it should note its interlanguage links between <tvar name="2"tt>{{tag|&lt;noinclude|open}}&gt;</tvartt> and <tvar name="3"tt>{{tag|&lt;/noinclude|close}}&gt;</tvartt>. This is the same idea as for [[<tvar name="4">mw:Special:MyLanguage/Help:Category</tvar>|categories]].
 
Comparison:
# <tt>[&#91;:en:link&#93;]</tt> or <tt>[&#91;:category:name&#93;]</tt> are ordinary links.
</translate>
# <translate><tvar name="1"><codett>[&#91;m:en:link&#93;]</code></tvartt> or <tvar name="2"><codett>[&#91;m:category:name&#93;]</code></tvartt> are ordinaryinterwiki links, see above.</translate>
# <tt>[&#91;category:name&#93;]</tt> without leading colon, adds a category to the page.
# <translate><tvar name="1"><code>[&#91;m:en:link&#93;]</code></tvar> or <tvar name="2"><code>[&#91;m:category:name&#93;]</code></tvar> are interwiki links, see above.</translate>
# <translate><tvar name="1"><codett>[&#91;categoryen:namelink&#93;]</code></tvartt> without leading colon, adds aan categoryinterlanguage link to the page.</translate>
# <tt>&lt;noinclude&gt;[&#91;category:name&#93;]&lt;/noinclude&gt;</tt> limits it to the actual page.
# <translate><tvar name="1"><code>[&#91;en:link&#93;]</code></tvar> without leading colon, adds an interlanguage link to the page.</translate>
# <translate><tvar name="1"><codett>&lt;noinclude&gt;[&#91;categoryen:namelink&#93;]&lt;/noinclude&gt;</code></tvartt> also limits it to the actual page.</translate>
# <translate><tvar name="1"><code>&lt;noinclude&gt;[&#91;en:link&#93;]&lt;/noinclude&gt;</code></tvar> also limits it to the actual page.</translate>
 
For projects like [[m:|Meta]], a missing leading colon has no effect, because Meta doesn't support interlanguage links. For [[w:|Wikipedia]] and similar projects, it is a major difference. The mutual order of interlanguage links is preserved, but otherwise the positions within the wikitext are immaterial, again the same rule as for categories. Usually they are put at the end. With section editing, they appear in the preview, if they are in the section being edited. A link to the project itself (hence, also a link to the page itself), even if referred to with the project prefix, appears in-page.
<translate>
For projects like Meta, a missing leading colon has no effect, because Meta doesn't support interlanguage links. For Wikipedia and similar projects, it is a major difference. The mutual order of interlanguage links is preserved, but otherwise the positions within the wikitext are immaterial, again the same rule as for categories. Usually they are put at the end. With section editing, they appear in the preview, if they are in the section being edited. A link to the project itself (hence, also a link to the page itself), even if referred to with the project prefix, appears in-page.
 
Suppose that we have pages <tvar name="1">[[:de:Zug]]</tvar>, <tvar name="2">[[:en:Train]]</tvar> and <tvar name="3">[[:fr:Train]]</tvar>, then we need:
* on de: [[:en:Train]], [[:fr:Train]]
</translate>
* <translate>on <tvar name="1">de</tvar> interwikien:</translate> [[:ende:TrainZug]], [[:fr:Train]]
* <translate>on <tvar name="1">en</tvar> interwikifr:</translate> [[:de:Zug]], [[:fren:Train]]
* <translate>on <tvar name="1">fr</tvar> interwiki:</translate> [[:de:Zug]], [[:en:Train]]
<translate>
 
=== In-page interlanguage links ===
 
To make an interlanguage link in-page, prefix a colon (e.g. <tvar name="1"><nowiki>[[:en:wiki|wiki]]</nowiki></tvar>). This can be useful to link to a page in another language, if no local version is available. For example, several templates for conveniently making such links would be:
</translate>
* {{links-small|w|template|nli}} - <nowiki>[[:nl:{{{1}}}]] (in [[Dutch language|Dutch]])</nowiki>
* {{links-small|w|template|nlil}} - <nowiki>[[{{{1}}}]] ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>
* {{links-small|w|template|nlii}} - <nowiki>''[[{{{1}}}]]'' ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>
* {{links-small|w|template|nlis}} - <nowiki>([[:nl:{{{1|{{PAGENAME}}}}}|nl]])</nowiki>
* {{links-small|w|template|nlinl}} - <nowiki>{{{1}}} ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>
 
<translate>
=== Interlanguage links in the wider sense ===
An interlanguage link in the wider sense includes a link to a corresponding page in another language, which, for the software, is a regular link, as opposed to one employing the special interlanguage link ''feature'' as described above. This can also be an internal link on a multilingual project, e.g. on Meta:
* [[Meta:Interlanguage links]]
 
An interlanguage link in the wider sense includes a link to a corresponding page in another language, which, for the software, is a regular link, as opposed to one employing the special interlanguage link ''feature'' as described above. This can also be an internal link on a multilingual project, e.g. on Meta:
</translate>
* {{ll|Meta:Interlanguage links}}
<translate>
Possible reasons for using an "interlanguage link" in the page body include:
* Control over position
</translate>
* Control over label
* <translate>control over position</translate>
* The target contains an anchor
* <translate>control over label</translate>
* <translate>the target contains an anchor</translate>
 
<translate>
== Interwiki links versus external links ==
 
Disadvantages of interwiki links:
</translate>
* <translate>The wikitext is less portable across wikis, because wikis do not always have an interwiki prefix for the same sites and even if they do, the prefixes may differ.</translate>
* <translate>There is no feature to find interwiki links, while searching for an external link can be done with <tvar name="1">[[Special:Linksearch]]</tvar> (if installed). This is due to the fact that, while there is an <tvar name="2">[[mw:Special:MyLanguage/Manual:Externallinks table|externallinks]]</tvar> table, there is no such thing for interwiki links. The <tvar name="3">[[mw:Special:MyLanguage/Manual:Interwiki table|interwiki]]</tvar> table only stores the interwiki prefixes with their targets as function of the parameter, not the instances of the links.</translate>
** <translate>There is the <tvar name="1">{{ll|iw=mw|API:iwbacklinks|nsp=0}}</tvar> query API that returns the pages that use the requested interwiki prefix.</translate>
** <translate>Using the general text search, to search for interwiki links, is more work for the server and therefore, it may be slow, not up-to-date or in busy hours, disabled. See also: [[<tvar name="1">mw:Special:MyLanguage/Help:What links here#Finding external links to a page</tvar>|Finding external links to a page]].</translate>
* <translate>They're misleading because the user has no indication that they're being taken to a different site.</translate>
 
<translate>
Using templates like <tvar name="1">{{links-small|template|h:mlw}}</tvar>, the advantages of interwiki links and external links are combined. When a page using this template, which is in this case used for links to the English Wikipedia, is copied to that site, a template with the same name is needed there too. Due to that template, <tvar name="2">{{links-small|w|template|h:mlw}}</tvar>, which redirects to <tvar name="3">{{links-small|w|template|h:ml}}</tvar>, the interwiki links are automatically converted to internal links. Hence, they provide existence detection and allow use of "What links here", as well as Linksearch.
 
Comparison:
</translate>
* <translate><tvar name="1"><nowiki>[[imdbtitle:0389790|Bee Movie]]</nowiki></tvar> gives <tvar name="2">''[[imdbtitle:0389790|Bee Movie]]''</tvar></translate>
* <translate><tvar name="1"><nowiki>[https://www.imdb.com/title/tt0389790 Bee Movie]</nowiki></tvar> gives <tvar name="2">''[http://www.imdb.com/title/tt0389790 Bee Movie]''</tvar></translate>
** <translate>[<tvar name="url">https://meta.wikimedia.org/w/index.php?title=Special%3ALinksearch&target=http%3A%2F%2Fwww.imdb.com%2Ftitle%2Ftt0389790</tvar> Linksearch] works for the latter only</translate>
<translate>
The applicable CSS classes are "<tvar name="1">extiw</tvar>" and "<tvar name="2">external text</tvar>". The choice may be governed by this, either way, for uniformity or distinction. An interwiki link is easier to type by itself, but if one goes to the webpage anyways, before putting the link, copying the URL is very convenient. When a template is created, e.g. <tvar name="3">{{tiw|imdb title}}</tvar>, the template can be made, such that it uses an interwiki link and a parameter, like "tt0389790" or "0389790", or that it uses an external link and a parameter like one of those or the full url, if that is more convenient.
 
== Interwiki links to the same wiki versus internal links ==
 
Disadvantages of interwiki links to the same wiki, compared to internal links:
</translate>
* <translate>no existence detection</translate>
* <translate>"What links here" works for internal links only</translate>
* <translate>The interwiki link prefix for the same wiki should be supported otherwise it creates an invalid internal link.</translate>
 
<translate>
Advantages of interwiki links to the same wiki, compared to internal links:
</translate>
* <translate>better portability across wikis, provided that the same prefix applies and is not equal to a namespace name</translate>
 
<translate>
When using templates like <tvar name="1">{{links-small|template|h:ml}}</tvar>, the advantages of internal links, interwiki links and external links are combined, provided that a template with the same name and adapted content is present on the other site.
 
== See also ==
* [[mw:Help:Interwiki linking]]
</translate>
* [[mw:Manual:Interwiki]]
* <translate>[[<tvar name="1">mw:Special:MyLanguage/Help:Interwiki linking</tvar>|Help:Interwiki linking]] on MediaWiki</translate>
* {{ll|Templates for[[w:Help:Interwiki linking to sister projects}}]]
* [[Help:Interlanguage link demo]]
* {{ll|Interwiki map}}
* {{mlm|Sister projects||Wikimedia sister projects}}
** [[phab:source/mediawiki/browse/master/maintenance/interwiki.list|<translate>Default interwiki prefixes</translate>]]
* [[m:Templates for linking to sister projects]]
* <translate>[[w:Help:Interwiki linking|Help:Interwiki linking]] on Wikipedia</translate>
* {{mlm|Interwiki map||Wikimedia interwiki map}}
** [https://phabricator.wikimedia.org/diffusion/MW/browse/master/maintenance/interwiki.list Default interwiki prefixes]
*[[MeatBall:InterWiki]]
{{h:f|langs=|enname=Interwiki linking}}
 
[[Category:EditorHandbook handbook{{#translation:}}Wikimedia-specific]]
[[Category:Content and banner management]]