Template:H:interwiki linking

From MozillaWiki
Jump to: navigation, search

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.

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 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 Wikipedia, unless the link is from a Wiktionary or Wikiquote, then the language version of that 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 - Wikipedia in the same language as the project the link is from (if that is multilingual, then English)
    • 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)
    • b:Main Page - Wikibooks in the same language as the project the link is from (if that is multilingual, then English)
    • 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
    • links from a Wikipedia to a Wiktionary or Wikiquote other than the English one go through the English Wiktionary
    • links from a Wikipedia to Wikisource go through Meta
  • 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 it 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 [1], 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, Wikibooks, Wikisource, Wikiquote, 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