Help:Interwiki linking on Wikimedia wikis: Difference between revisions

Content deleted Content added
Project titles and shortcuts: Tool Labs -> Toolforge
Tags: Mobile edit Mobile web edit
ExE Boss (talk | contribs)
Project titles and shortcuts: Add more long form prefixes for Meta‑Wiki
Line 5:
This is called [[w:en:InterWiki|interwiki]]. For each project, an [[m:Interwiki map|interwiki map]] (a list of target projects with their prefixes) is specified ([//svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/interwiki.sql?view=markup example]). These target projects need not use MediaWiki and need not even be a wiki.
 
== Interwiki linking from and within Wikimedia ==
Within [[m:Wikimedia|Wikimedia]], for the purpose of {{mlww|interlanguage links||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.
 
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 ===
<section begin=iwl-tables />
{| class="wikitable sortable" style="margin-bottom:0 ; margin-right:2em; display:inline-table;"
Line 64:
|-
| [[m:Meta:About|Wikimedia Meta-Wiki]]
|| <code>[[[[metawikipediametawiki:]]]]</code><br /><code>[[[[m:|meta:]]]]</code>!--
--><code>[[[[metawikimedia:]]]]</code><br/><!--
--><code>[[[[metawikipedia:]]]]</code><br/><!--
--><code>[[[[m:|<span title="meta:">meta:</span>]]]]</code>
| <code>[[[[m:]]]]</code>
|-
| [[m:Wikimedia Incubator|Wikimedia Incubator]]
| <code>[[[[incubator:]]]]</code>
|
| <code></code>
|-
| [[m:Strategy/Wikimedia movement/2010-2015|Wikimedia Strategic Planning]]
| <code>[[[[strategy:]]]]</code>
|
| <code></code>
|-
| [[MediaWiki]]
Line 81 ⟶ 84:
| [[Bugzilla|MediaZilla / Bugzilla]]
| <code>[[[[mediazilla:]]]]</code><br /><code>[[[[bugzilla:]]]]</code>
|
| <code></code>
|-
| [[m:Phabricator|Phabricator]]
Line 89 ⟶ 92:
| [[m:Testwiki|Testwiki]]
| <code>[[[[testwiki:]]]]</code>
|
| <code></code>
|-
| [[Wikidata]]
Line 97 ⟶ 100:
| [[wikitech:|Wikitech]]
| <code>[[[[wikitech:]]]]</code>
|
| <code></code>
|-
| [[wikitech:Portal:Toolforge|Toolforge]]
| <code>[[[[toolforge:]]]]</code>
|
| <code></code>
|}
{| class="wikitable sortable" style="margin-bottom:0; display:inline-table;"
Line 205 ⟶ 208:
<section end=iwl-text />
 
=== Interwiki links on other sites ===
Other MediaWiki installations will support different interwiki prefixes.
You may be able use the [[mw:API:Query_-_Meta#siteinfo_.2F_si|MediaWiki API]] to query for a site's available interwiki prefixes.
Line 211 ⟶ 214:
api.php?action=query&meta=siteinfo&siprop=interwikimap
 
== Technical ==
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: [[en:Wikisource:Wikisource:Scriptorium]].
 
For portability across projects, one may want to select a link code that leads to the same target from all projects, for example: [[MetaWikipedia:wikibooks:Main Page]]. The "superfluous" "MetaWikipedia:" prevents "wikibooks:" being interpreted as namespace prefix, when the code is used at wikibooks itself, while at Meta the "MetaWikipedia:" 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 [[Help:Link#Wikilinks|existence detection]] and the [[Help:Self link|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
Line 271 ⟶ 274:
In short, if you want the links to always work in the same way, always use <code><nowiki>[[</nowiki>'''m:'''<nowiki>Example]]</nowiki></code> to link to anything on Meta-Wiki; always use <code><nowiki>[[</nowiki>'''w:en:'''<nowiki>Example]]</nowiki></code> to link to anything on English Wikipedia; always use <code><nowiki>[[</nowiki>'''q:de:'''<nowiki>Beispiel]]</nowiki></code> 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.
The following works:
Line 284 ⟶ 287:
Non-local interwiki links will still work if you type them in the search bar and choose "go".
 
== Wikia ==
In [[w:en:Wikia|Wikia]], the prefix is the ''internal'' project name for some older wikis. For others, "Wikia:c:" is added in front (e.g. <tt>[&#91;Wikia:c:psychology&#93;]</tt> or shorter <tt>[&#91;w:c:trains:locomotive&#93;]</tt>). (The "c" is for "city", a legacy of Wikia's original name ''Wikicities''.)
 
Line 291 ⟶ 294:
''From Wikimedia projects'', use <tt>[&#91;wikiasite:psychology&#93;]</tt>, giving [[wikiasite:psychology]]; <tt>[&#91;wikia:trains:locomotive&#93;]</tt>, giving [[wikia:trains:locomotive]]; or for the central wikia, [[centralwikia:About Wikia]]. ''Don't confuse this with [[wikia:c:Community Central]] and other pages on the Community Central wikia.''<!-- {{lcfirst:Wikia}} is the official name for Wikis hosted by {{ucfirst:Wikia}} -->
 
== Interlanguage links ==
:''For a complete list of current languages and language codes, see: [[w:List of Wikipedias]]''
 
Line 324 ⟶ 327:
* [[Template:Other languages/Meta:About|Template:About]]
 
=== In-page interlanguage links ===
To make an interlanguage link in-page, prefix a colon (e.g. <nowiki>[[:en:wiki|wiki]]</nowiki>). 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:
 
Line 333 ⟶ 336:
* {{links-small|w|template|nlinl}} - <nowiki>{{{1}}} ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>
 
=== 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]]
Line 342 ⟶ 345:
* the target contains an anchor
 
== Interwiki links versus external links ==
Disadvantages of interwiki links:
* 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
Line 357 ⟶ 360:
The applicable CSS classes are "extiw" and "external text". 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. {{tiw|imdb title}}, 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:
* no existence detection
Line 368 ⟶ 371:
When using templates like {{links-small|template|h:ml}}, 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]]
* {{mlm|Sister projects||Wikimedia sister projects}}