|
|
(5 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | {{h:h|editor toc}}
| |
− |
| |
| ==General== | | ==General== |
| | | |
− | By adding a prefix to another project, internal link style ("prefixed internal link style") can be used to [[Help:Link|link]] to a page of another project. For example, <code><nowiki>[[wikipedia:interwiki]]</nowiki></code> links to the [[interwiki]] article on the English Wikipedia. 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 ([http://cvs.sourceforge.net/viewcvs.py/*checkout*/wikipedia/phase3/maintenance/interwiki.sql?content-type=text%2Fplain&rev=1.6 example]). These target projects need not use MediaWiki and need not even be a wiki. | + | By adding a prefix to another project, internal link style ("prefixed internal link style") can be used to [[Help:Link|link]] to a page of another project. A project's own namespace prefix can not 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, e.g. <nowiki>[[en:Wikisource:Wikisource:Scriptorium]]</nowiki>. |
− | | |
− | A project's own namespace prefix can not 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, e.g. [[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, e.g. [[MetaWikipedia:wikibooks:Main Page]]. The "superfluous" "MetaWikipedia:" prevents "wikibooks:" to be 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#Linking_from_a_page|existence detection]] and the [[Help:Self link|self-link feature]] do not work on interwiki links. | | For portability across projects, one may want to select a link code that leads to the same target from all projects, e.g. [[MetaWikipedia:wikibooks:Main Page]]. The "superfluous" "MetaWikipedia:" prevents "wikibooks:" to be 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#Linking_from_a_page|existence detection]] and the [[Help:Self link|self-link feature]] do not work on interwiki links. |
− |
| |
− | ==Interlanguage link (software feature)==
| |
− |
| |
− | For a multilingual family of similar projects, with one project per language, a system for '''interlanguage linking''' can be set up. 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).
| |
− |
| |
− | 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, and top and bottom in Classic). To make it inline, prefix a colon (e.g. <nowiki>[[:en:wiki|wiki]]</nowiki>).
| |
− |
| |
− | The link label depends only on the sister project that is linked to, not on the linked page. The label is is set in the configuration of the project. Typically, it is the name of the language written in that language. The target is only shown in the status bar, depending on the browser (oddly, there is not even a hover box).
| |
− |
| |
− | Thus, interlanguage link is mainly suitable for linking to the ''corresponding'' page in another language. It is not suitable for multiple links of the same other language. See '''[[m:Interlanguage use case]]''' 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 [[Help:template|template]] (even if it is not in the template namespace), it should not have an interlanguage link; such a link appears in the edge of the page that includes the template, giving the impression that the link is to a version of the referring page in the other language. For the same reason, pages in the [[Help:MediaWiki namespace|MediaWiki namespace]] are not suitable to put an interlanguage link in.
| |
− |
| |
− | The mutual order of interlanguage links is preserved, but otherwise the positions within the wikitext are immaterial. 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 [[:de:Zug]], [[:en:Train]], [[:fr:Train]] than we need:
| |
− | *on de: [[:en:Train]], [[:fr:Train]]
| |
− | *on en: [[:de:Zug]], [[:fr:Train]]
| |
− | *on fr: [[:de:Zug]], [[:en:Train]]
| |
− |
| |
− | Thus there is not the possibility of simply copying each list, let alone of using a template, as can be done if different languages share one project, with or without separate namespaces, see e.g.:
| |
− | *[[m:Template:H-langs:Interwiki linking]] used at the bottom of [[m:Help:Interwiki linking|the master copy of this page on Meta]]
| |
− | *[[wikisource:Template:InterLingvLigoj]]
| |
− | *[[m:Template:About]].
| |
− |
| |
− | Project families with interlanguage links:
| |
− | *several Wikimedia project families, see below
| |
− | *a family of six Wikicities projects, see [[wikicities:c:WikiMac:WikiMac:Interlanguage links]]
| |
− |
| |
− | {{h:1}}
| |
− |
| |
− | ==Wikicities==
| |
− | In [[w:en:Wikicities|Wikicities]], the prefix is the internal project name for some older wikis. For others, "Wikicities:c:" is added in front (e.g. <code><nowiki>[[Wikicities:c:chicago]]</nowiki></code>).
| |
− |
| |
− | From outside, e.g. from Wikimedia projects, "wikicities:c:" is added in front, for example [[wikicities:c:Trains:Catégorie:Chronologie]].
| |
− |
| |
− | ==See also==
| |
− |
| |
− | *[[m:Help:Guide for system administrators for setting up interwiki linking]]
| |
− | *[[w:en:Wikipedia:Interwikimedia link]]
| |
− | *[[m:Interwiki link problem]]
| |
− | *[[m:Interwiki map]]
| |
− | *[http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/maintenance/interwiki.sql interwiki.sql]
| |
− | *[[m:Help:Special_characters#Esperanto|Interwiki links to the same page are different from the Esperanto Wikipedia]]
| |
− | *[[wikisource:Wikisource talk:Language domain requests]] - Discussion of upcoming transition to language subdomains.
| |
− |
| |
− | {{h:f|langs=|enname=Interwiki linking}}
| |
By adding a prefix to another project, internal link style ("prefixed internal link style") can be used to link to a page of another project. A project's own namespace prefix can not 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, e.g. [[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, e.g. MetaWikipedia:wikibooks:Main Page. The "superfluous" "MetaWikipedia:" prevents "wikibooks:" to be 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 existence detection and the self-link feature do not work on interwiki links.