Help:Interwiki linking

From Wikipedia, the free encyclopedia.

Jump to: navigation, search
This is a copy of m:Help:Interwiki linking using Wikipedia-specific templates. Do not edit this page. Edits will be lost in the next update from Meta. Please carry out such an update simply by exactly copying the wikitext. To make changes applicable on all projects, edit the master page; to change Wikipedia-specific content, edit the templates; to make demos work, copy templates and images to this project.

Contents

General

Within each project, interwiki linking to a page of another project is possible with internal link style, with a prefix for the other project ("prefixed internal link style"). For each project, an interwiki map (or "InterMap") is specified, i.e. a list of target projects with their prefixes, e.g. [1]. These target projects need not use MediaWiki and need not even be a wiki.

For a given project the namespace prefixes can not also be used as code for an external project. However, the prefix used for a target project may coincide with the prefix for the project namespace within that project. As a result, to link to a page in that namespace one has to use the same prefix twice, e.g. [[en:Wikisource:Wikisource:Scriptorium]].

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 (in Monobook on the left, in Classic at the top and bottom); to make it inline, prefix a colon.

The link label depends only on the sister project that is linked to, not on the page; it is set in the configuration of the project, typically it is the name of the language in that language. The target is only shown in the hover box and the status bar, depending on the browser.

Therefore this kind of link is mainly suitable for linking to the corresponding page in another language, and not very suitable for multiple links to the same other language. See also 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 a page that might be used as a template, even if it is in an other than the template namespace, is not very suitable to put an interlanguage link in: such a link appears in the edge of the page that includes the template, giving the impression that the link is to a version in the other language of the referring page instead of the template. For the same reason pages in the MediaWiki namespace are not very 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.


Interwiki linking from and within Wikimedia

Within Wikimedia, for the purpose of interlanguage links (see above) the project families are Wikipedia, Wiktionary, Wikiquote and Wikibooks. 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, or from a Wikibooks to another one.

The interlanguage link feature works on Commons, and produces links to the Wikipedias. This is not reciprocal: a link from a Wikipedia to Commons is an in-page link.

Exceptions

The list of language codes for which this feature applies, including languages which have no Wikipedia, Wiktionary and Wikiquote yet, but for which the feature potentially applies, i.e. applies after the wiki has been created, with local and English name of the language, is Names.php.

The languages that have a Wikipedia and (possibly empty) Wiktionary that are not on the list (commented out) are Klingon (artificial) and Serbocroatian (obsolete). Interwiki links to these always appear in the page body, e.g. tlh:tlhIngan Hol; see also m:Artificial languages equal rights.

The exceptions apply for linking to those projects, not for linking from them.

Prefixes

The following rules apply:

  • links like this are possible ("Main Page" and "de:" are just examples):
    • en:Main Page, de:Hauptseite, etc. - language version of the same set of projects; this works for all existing Wikipedias (list of codes) and Wiktionaries and Wikiquotes (same list, but not for all languages a Wikiquote exists yet)
    • w:Main Page (see also MediaZilla:971):
      • from Wikipedias, this links to the English Wikipedia
      • from non-Wikipedias, this links to the Wikipedia in the same language
    • w:en:Main Page - English Wikipedia (note that w:w:Main Page links to the English Wikipedia from non-English non-Wikipedias, but gives "Bad title" from other projects)
    • w:de:Hauptseite - German Wikipedia (also from a Wiktionary or Wikiquote) (sometimes this does not work, perhaps this depends on the use of special characters)
    • m:Main Page - Meta
    • wikisource:Main Page - Wikisource
    • commons:Main Page - Wikimedia Commons
    • wikt:Main Page - Wiktionary in the same language as the project the link is from (if that is multilingual, then English)
    • q:Main Page - Wikiquote in the same language as the project the link is from (if that is multilingual, then English), except from a wikiquote
    • b:Main Page - Wikibooks in the same language as the project the link is from (if that is multilingual, then English), except from a wikibooks
    • n:Main Page - Wikinews in the same language as the project the link is from (if that is multilingual, then English), except from a wikinews
    • sep11:In Memoriam - In Memoriam wiki

Some cases also work without the "m:" if the link is not from the project itself, see below.

  • a prefix that is "superfluous", because it refers to the same project, is allowed in the case of the prefix en:, de:, etc., w:, and m:, but not for the prefixes wiktionary:, wikibooks:, wikiquote and commons (in the project itself the last four are taken as namespace prefixes)
  • as demonstrated above by the double prefixes, links may cumulate, thus enabling links that are not possible with a single prefix:
    • links from a Wiktionary or Wikiquote to a Wikipedia other than the English one go through the English Wikipedia
      • Examples: from French Wikiquote to:
        • English Wikipedia: [[:en:wikipedia:<whatever>|<whatever>]]
        • English Wikiquote: [[:en:<whatever>|<whatever>]]
        • French Wikipedia: [[:w:<whatever>|<whatever>]]
    • links from a Wikipedia to a Wiktionary or Wikiquote other than the English one go through the English Wiktionary
      • Examples: from French Wikipedia to:
        • English Wikipedia [[:en:<whatever>|<whatever>]]
        • English Wikiquote [[:wikiquote:<whatever>|<whatever>]]
        • French Wikipedia [[:wikiquote:fr:<whatever>|<whatever>]]
    • links from a Wikipedia to Wikisource go through Meta
  • remember that q: and b: work differently from w:. In particular, from a non-English project, q: and b: link to projects in the same language, but w: without any following language code links to a central place that redirects to the English wikipedia. There is confusion in this area - See MediaZilla:971.
  • for portability across projects one may want to select a link code that leads to the same target from each project, e.g. m:wikibooks:Main Page. The "superfluous" m: prevents "wikibooks:" to be interpreted as namespace prefix when the code is used at wikibooks itself, while at Meta the m: 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, when used on the project itself, the existence detection does not work.

Prefixed internal link style is also possible for links to various wikis and some other sites outside Wikimedia, e.g. Wiki:WelcomeVisitors and MeatBall:MeatballWiki, and Google:searchterm. A list of sites is at [2], see also Interwiki map and en:Interwiki.

A prefix other than w:, wiktionary:, wikiquote:, m:, wikibooks, a valid language code, or a valid code for an external wiki, is treated as an internal link: a namespace prefix or just the first part of the name of a page in the main namespace.

The simplest interwiki links consist of the prefix only; they lead to the main page.

Only links within a project may show as broken, leading to the edit page. Existence is not shown for links to pages of other projects, until the link is applied.

Interlanguage link in the wider sense

An interlanguage link in the wider sense includes what, for the software, is a regular link, also an internal one on projects which are shared by different languages: Meta and Wikisource, see:

Possible reasons for using an "interlanguage link" in the page body include:

  • control over position
  • control over label
    • especially useful in the case of a page used as a template, so that on the referring page the link label can explain what the link target is.
  • the target contains an anchor

Links to Wikimedia

Many wikis allow the prefixes WikiPedia (for the English Wikipedia) and MetaWikiPedia, which are in http://usemod.com/intermap.txt. Linking from a CamelCase-wiki (which does not use brackets for links) to a page that contains spaces in its title typically requires substitution of the spaces with underscores, e.g. WikiPedia:Main_Page. For details, refer to the wiki one wants to link from. edit this template

See also

Wikipedia-specific content and links to other help pages

-
edit this Wikipedia- and subject-specific template
Help contents - all pages in the Help namespace: Meta b: c: n: w: q: wikisource wiktionary


Reading: Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary | Minor edit
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview | New page | Images/files | Image description page | Special characters | Formula | Table | EasyTimeline | Template intro | Renaming (moving) a page | Automatic conversion of wikitext | Talk page | Testing | rlc
Projects: Meta (master page) | Wikibooks | Wikicommons | Wikinews | Wikipedia | Wikiquote | Wikisource | Wiktionary
For other languages see Meta.

Personal tools