Template:Language Links experimental

From OpenStreetMap Wiki
Jump to: navigation, search

Read this Page in English, Dansk, Deutsch, Español, Français, Italiano, Japanese, Slovenščina or Svenska

Template Description

This is an approach to create a more flexible language linker which allows to link to translated pages with a non-english page title. This allows translators to set page titles in their native language. This template is still under construction and may be changed/moved/deleted in future. Use Template:Languages instead.


{{Language Links experimental|de=Deutscher Seitentitel|fr=Titre Français}}

Should (when inserted into a Page called English title) result in:

Read this page in English, Dansk, Deutsch, Español, Français, Italiano, Japanese or Svenska

Notice: The link Deutsch links to the page Deutscher Seitentitel instead of De:English Title. The Link Français links to Titre Français instead of Fr:English title

There is an optional attribute lang which determines the output's language.

{{Language Links experimental|lang=de}}

For example results in Lies diese Seite auf (...) oder (...)

Available languages:

en English (default)
de Deutsch (German)
fr Français (French)
es Español (Spanish)

If you intend to use this template, consider the following things:

  • Use this template for testing purposes only. It is not stable yet. For non-testing purposes, use Template:Languages instead.
  • If you translate a page, without using the title setting scheme <langcode>:<english title> (i.e. De:EnglishTitle), do not forget to adjust the links of all other translations of this page by adding a parameter (i.e. de=Deutscher Titel) to avoid double translations.
  • If you add this template to a non-English page, always set the parameter en (i.e. en=EnglishTitle). This causes all other links to adopt the scheme <langcode>:<english title> instead of <langcode>:<actual title>.
  • If you add this template to a non-English page, set the parameter of the page's language to {{PAGENAME}} (i.e. de=Language Links experimental for a German page). If you don't do so, the link of the actual language will link to a non-existing page.


To add support for your language, you have to edit two pages:

  • Template:Language_Links_experimental/langcode/readin
  • Template:Language_Links_experimental/langcode/or

Replace langcode with the desired Language code (i.e. «de» for German). The readin-Page contains a Translation of «Read this page in», the or-Page a Translation of the english word «or».