Template:Langrev/doc

Usage
This template is used to-reverse-map language names to their codes. It is the reverse of direct transclusion of the language code template. It has one unnamed parameter, which should be the name of the language to be converted. If a mapping for that name exists, it will return the code for it on Wiktionary. If it doesn't exist, it returns an empty string. The template can be used equally well with or without subst:.

The mapping is done with subtemplates, which contain just the code in question. For example, contains en. The mapping can be many-to-one, since a language might have more than one given name. Of course, only one of those will be what the language code itself expands to. So it may be possible for to equal nds even though  equals Low German. In technical terms, this template is not injective (one-to-one) and therefore can't be reversed.

This template may be used directly to determine a language's code (or name): type, for example, in the Sandbox or Special:ExpandTemplates, and it will return "en".

It is also used by some other templates, such as Template:langcat.


 * All mappings