Wiki canonicalization is the algorithm by which the text of links (in [single] or [[double]] pair of square brackets) is converted to a URI.
- Precede URIs with "http:", "ftp:", "gopher:", "mailto:", or "news:", with no pair of brackets, to create links automatically (this is not canonicalization). This includes links to .gif, .jpg, .jpeg or .png URIs; it does not display the image inline.
- A single pair of square brackets is for an in-line link to another site. For example, [http://www.wiktionary.org/] produces this: [1] (http://www.wiktionary.org/), while [http://www.wiktionary.org/ Wiktionary] produces this: Wiktionary (http://www.wiktionary.org/).
- A double pair of square brackets creates an intra-wiki link, i.e. a link to a Ireland Information Guide article. The special syntax [[wiktionary:verb]] allows you to link to an article on another Wiki (in this case, Wiktionary's entry for verb); see InterWiki. Use Interlanguage links to create the links at the top and bottom of articles that link to the same article in another language.
- Whitespace is converted to underscores (e.g. the page "Star Trek" is actually located at "Star_Trek"). Multiple consecutive underscores and spaces are contracted to just one underscore.
- Leading or trailing whitespace/underscores are removed.
- Character references are replaced with their raw character (e.g. if you write "département" it will link to département).
- For Interwiki or Interlanguage Links, processing stops here. For other links:
- Illegal characters are stripped (e.g. ^)
- The first character is capitalised.
- If there is a namespace prefix (Talk:, Ireland Information Guide:, User:, etc.), the first character of the article name (what comes after the colon) is also capitalised.
Example: [[ death in Vegas ]] creates a link to the page Death in Vegas.
See also