Template:LangToWiki

en

Template documentation

This template returns the Wikidata interwiki identifier which matches with interface language or the given language code.

Returns the Wikidata interwiki identifier string, from interface language or given language code.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Language code1

no description

Example
pt-br
Stringsuggested

Examples

  • {{langToWiki}} gives en
  • {{langToWiki|pt}} gives pt
  • {{langToWiki|pt-br}} gives pt
  • {{langToWiki|zh-hans}} gives zh
  • {{langToWiki|nan}} gives zh_min_nan
  • {{langToWiki|wikidata}} gives wikidata (not a language)
  • {{langToWiki|abcdef}} gives abcdef (not a language)

See also

  • {{LangToIw}} which gives interwiki prefix (instead of Wikidata site identifier) and uses page language as default (instead of interface language).