Template:wikimedia language name

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

The following documentation is located at Template:wikimedia language name/documentation. [edit]


This template generates the name of any language from a Wikimedia language code; otherwise, from a Wiktionary language code.

Mechanics

This template employs a #switch parser function with a list of codes that differ between Wikimedia and Wiktionary. If a code is not in this list, its name will be generated by the Wiktionary code template.

Usage

Simply place the code as the only, first, unnamed parameter.

Examples

  • {{wikimedia language name|roa-rup}} returns (from the #switch list):
    Aromanian
  • {{wikimedia language name|zh}} returns (from the #switch list):
    Chinese
  • {{wikimedia language name|fr}} returns (from the Wiktionary template):
    French

Exceptions

  • {{wikimedia language name|cmn}} is not a Wikimedia language code, but returns (from the Wiktionary template) anyway:
    Mandarin
  • {{wikimedia language name|qwerty}} is not a Wikimedia language code nor it is in a Wiktionary language code template, so it returns a red script error.