Template:Localized link

From Vintage Story Wiki


[[Special:MyLanguage/{{{1}}}|{{{1}}}]][[:{{{1}}}| ]]

Taken from MediaWiki.

This helper template can be used to link to translatable pages in the user's language. It uses the special page prefix Special:MyLanguage/, which checks if there is a translated version of a page in the user's language, and links to it if there is one, and links to a fallback language where available, or the default wiki language version (English on this wiki) if there isn't.

It should be used in translated pages, so that they link to the right page even if there is no translated page in that language.

Usage

{{ll|target page|display text}}

Usage in translatable pages

On pages prepared for translation, this template may be used in three ways.

  1. Substitute this template, and then use a wikilink target embedded in a <tvar name=id>...</tvar>, separate from the translatable displayed text of the link.
    For example, instead of {{ll|Communication|About communication}}, translation markup in translatable page will be [[<tvar name=1>Special:MyLanguage/Communication</tvar>|About communication]].
  2. Alternatively, you may exclude this code from translatable section.
    As an example, for some text {{ll|Communication|About communication}} some text, translation markup in translatable page will be:
    <translate>some text</translate> {{ll|Communication|2=<translate>About communication</translate>}} <translate>some text</translate>
    This is useful for bulleted lists of links, e.g. in the "See also:" sections.
  3. If the link text does not have to be different from the name of landing page, it is better to embed all this code into <tvar> tags.
    As an example, instead of {{ll|Communication}}, translation markup in translatable page will be <tvar name=1>{{ll|Communication}}</tvar>.

Details

This template has three parameters.

  • Target page (1). This is required. This is the page that the link should target.
  • Display text (2). This is suggested, but not required. This is the text that should be displayed for the link.
  • Namespace display (nsp). This is optional. If “nsp” parameter is not defined, as link text displays the full pagename (including namespace); otherwise — if “nsp” parameter is defined by any value — link text displays the short pagename, without namespace.