Wlink - Syntax

Syntax

Interwiki link notation varies, depending largely on the syntax a wiki uses for markup. The two most common link patterns in wikis are CamelCase and free links (arbitrary phrases surrounded by some set delimiter, such as ]). CURIE syntax -an emerging W3C standard- uses a single set of square brackets.

Interwiki links on a CamelCase-based wiki frequently take the form of "Code:PageName", where Code is the defined InterMap prefix for another wiki. Thus, a link "WikiPedia:InterWiki" could be rendered in HTML as a link to an article on Wikipedia for example Wikipedia:Interlanguage links. Linking from a CamelCase-wiki to a page that contains spaces in its title typically requires substitution of the spaces with underscores (e.g. WikiPedia:Main_Page).

Interwiki links on wikis based on free links, such as Wikipedia, typically follow the same principle, but using the delimiters that would be used for internal links. These links can then be parsed and escaped as they would be if they were internal, allowing easier typing of spaces but potentially causing problems with other special characters. For example, on Wikipedia, ] appears as MeatBall:AssumeGoodFaith, and ] (former syntax: ]) appears as de:InterWiki.

The MediaWiki software has an additional feature which uses similar notation to create automatic interlanguage links — for instance, the link ] (with no leading colon) automatically creates a reference labeled "Other languages: Deutsch | ..." at the top and bottom of, or in a sidebar next to, the article display. Various other wiki software systems have features for "semi-internal" links of this kind, such as support for namespaces or multiple sub-communities.

Most InterMap implementations simply substitute the interwiki prefix with a full URL prefix, so many non-wiki websites can also be referred to using the system. A reference to a definition on the Free On-line Dictionary of Computing, for instance, could take the form ] which would tell the system to append and display the link as Foldoc:foo. This makes it very easy to link to commonly referenced resources from within a wiki page, without the need to even know the form of the URL in question.

The interwiki concept can equally be applied to links from non-wiki websites. Advogato, for instance, offers a syntax for creating shorthand links based on a MeatBall-derived InterMap.

Read more about this topic:  Wlink