From OpenStreetMap Wiki
Jump to: navigation, search
[Edit] [Octicons-sync.svgpurge] Template-info.svg Template documentation
Dialog-warning-orange.svg Note: This Template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
  • Editing a Template causes all pages that use the Template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue.


Returns the language code of the user interface (defined by user preferences or selected by default on this wiki, or selected by an explicit "uselang=" query parameter specified when viewing the current page).

See Wikipedia:Meta:Template:Uselang for documentation.


This template still does not work as it uses {{Int:Lang}}, which requires resources in "Mediawiki:Lang/*" loaded by the wiki administrator for all supported localisations of the MediaWiki software.

For example Mediawiki:Lang should contain "en" (the default language code of this wiki), and its subpage Mediawiki:Lang/en should contain "en", and so on for all supported language codes).

For this reason this template will only return a default language, which is the language of the current page (not necessarily "en") as detected by {{Langcode}} (determined by its namespace or a language code prefix in the page name).

See also

  • Template:LangSwitch (for translating the UI only, don't use in the content of translated pages)
  • Template:Langcode (returns the language code of a translated page, instead of the language code of the user interface)