Template:H:Interwiki linking
From WikiGlide
Contents |
Interwiki linking from and within Wikimedia
Within Wikimedia, for the purpose of interlanguage links (see above) 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 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), Wiktionaries, and Wikiquotes (same list, but a Wikiquote doesn't exist for all languages yet); from other projects it links to the Wikipedia in the specified language; although http://os.wikipedia.org exists, "os:" does not work: os:a
- w:Main Page (see also bugzilla: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
- s: - Wikisource in the same language as the project the link is from (if that is multilingual, then start page with ring and list of languages)
- 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)
- bugzilla: - Mediazilla, the bug tracker; use this to link to bug reports like bugzilla:123
- 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>]]
- Examples: from French Wikiquote to:
- 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>]]
- Examples: from French Wikipedia to:
- links from a Wikipedia to Wikisource go through Meta
- links from a Wiktionary or Wikiquote to a Wikipedia other than the English one go through the English Wikipedia
- remember that q: and b: work differently from w:; e.g., b: from wikibooks itself does not work. See also 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 and the self-link feature do 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 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.
To link to other sites within Wikimedia, one can use WikiPedia:de: etc.
