Template:Languagename/doc


 * Usage&#58;
 * Works like  but supports the transition of legacy codes still used by MediaWiki or still not supported by   and   parser functions in MediaWiki.


 * Syntax&#58;


 * Parameters&#58;
 * code representing the language name (mandatory)
 * code of the language into which the language name will be translated (optional)
 * The default empty value will return the autonym, as if lang2=lang1; i.e. this template works like the  parser function of MediaWiki.
 * To display the language name translated in the current user language selected in the UI, pass the value  (the MediaWiki parser function   is similar, except that its default value for parameter 2 is the UI language rather than the value of parameter 1, so it does not return the language autonym by default like  ).
 * Note that locale tags from the BCP 47 standard (as well as language codes from the ISO 639 standard from which most of them are inherited) are not case sensitive, but should preferably use dashes (-) as separators between locale subtags rather than underscores (_).


 * Examples&#58;
 * generates ‹› (the language autonym, in its native script and orthography)
 * generates ‹› (should be the same as the previous)
 * generates ‹› (language name translated to English)
 * generates ‹› (language name translated to Arabic)
 * generates ‹› (should be the name translated in your own prefered language)


 * See also&#58;
 * Template:Languagename: main template which normalizes the input language codes, and uses some fallbacks shared across known variants (such as formal or informal variants in Wikimedia sites) of some target languages
 * Template:Languagename/db: subtemplate called internally after normalizing the input language codes, and using some fallbacks shared across known variants of some target languages, containing the actual names
 * Template:Scriptname