Template:LangPrefix/doc

From OpenStreetMap Wiki
Jump to: navigation, search

This template provides the language prefix for wiki page name from a language code.

Usage

  • {{LangPrefix}} returns the language prefix (with :) from the language code infered from the current page (using {{Langcode}}).
  • {{LangPrefix|language-code}} returns the language prefix (with :) from the language code.
  • {{LangPrefix|language-code|fallback= yes }} returns the language prefix for the fallback language of the specified language.

Examples

Wikitext Produces
"{{LangPrefix}}" ""
"{{LangPrefix|}}" ""
"{{LangPrefix|en}}" ""
"{{LangPrefix|ja}}" "JA:"
"{{LangPrefix|ain}}" "Ain:"
"{{LangPrefix|ain|fallback= yes }}" "JA:"
"{{LangPrefix|de-ch}}" "De-ch:"
"{{LangPrefix|de-ch|fallback= yes }}" "DE:"
"{{LangPrefix|br}}" "Br:"
"{{LangPrefix|br|fallback= yes }}" "FR:"

See also