Wikipedia:Canonicalization
From Wikipedia, the free encyclopedia
- Note: Canonicalization is not the same as Canonization.
Wiki canonicalization is the algorithm by which the text of links (in a pair of [single] or [[double]] square brackets) is converted to a Uniform Resource Identifier (URI).
|
- A single pair of square brackets is for an in-line link to another site or external URL on any website. For example,
[http://www.wiktionary.org/]produces this: [1], while[http://www.wiktionary.org/ Wiktionary]produces this: Wiktionary. - A double pair of square brackets creates an intra-wiki link (Internal link, see also Category:Internal link templates), which is usually a link to a Wikipedia article, but may link to another internal namespace.
The special syntax [[wiktionary:verb]] allows you to link 'Interwiki' to an article on another Wiki (in this case, Wiktionary's entry for verb); see InterWiki.
[edit] Portable convenience templates
The pipe trick can also be used with ordinary interwiki links, as an example [[wikt:verb|]] is transformed to [[wikt:verb|verb]] which is rendered as verb.
[edit] International interwikis
Another type of interwiki connection (indeed, the one most often termed an interwiki in daily usage), is the interlanguage link. These are used to create the links at the top and bottom of articles that link to the same article in another language, and generally can be found in a group on the bottom of Wikipedia articles, templates or categories, where category tagging also occurs. (This interwiki linkage is usually formalized and better presented in one of various templates; see Interwiki link templates.)
- General link building
- Regardless of whether templated, or using bracket sets singly or in pairs:
- Spaces are converted to underscores (for example, the page "Star Trek" is actually located at "Star_Trek"). Multiple consecutive underscores and spaces are contracted to just one underscore.
- Leading or trailing spaces and underscores are removed.
- Character references are replaced with their raw character (for example if you write "département" it will link to département).
- For interWiki or interlanguage links, processing stops there. For other links:
- The first character is capitalised. (Exception: Wiktionary uses lower-case first letter names.)
- If there is a namespace prefix (Talk:, Wikipedia:, User:, etc.), the first character of the article name (which comes after the colon) is also capitalised.
[edit] Examples
[[_death _in_ Vegas_]]creates a link to the pageDeath_in_Vegas, and appears as "_death _in_ Vegas_".[[wikipedia: quick guide]]creates a link to the pageWikipedia:Quick_guide, and appears as "wikipedia: quick guide".
[edit] See also
- Wikipedia:How to edit a page#Links and URLs
- Wikipedia:Manual of Style (links)
- Wikitext formatting rules
- UseMod:Text Formatting Rules
- HTML elements
Wikipedia is hosted by the Wikimedia Foundation, a non-profit organization that also hosts a range of other projects:
| Commons Free media repository |
Wikinews Free-content news |
Wiktionary Dictionary and thesaurus |
|||
| Wikiquote Collection of quotations |
Wikibooks Free textbooks and manuals |
Wikisource Free-content library |
|||
| Wikispecies Directory of species |
Wikiversity Free learning materials and activities |
Meta-Wiki Wikimedia project coordination |

