మూస:langrev
- The following documentation is located at Template:langrev/doc. [edit]
- Note: Please move the documentation subpage to Template:langrev/documentation.
Usage
[<small>మార్చు</small>]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, {{langrev/English}} 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 {{langrev|Low Saxon}} to equal nds even though {{nds}} equals Low German. In technical terms, this template is not injective (one-to-one) and therefore can't be reversed.
See also
[<small>మార్చు</small>]- caps (returns a particular letter, either in upper or lower cases)
- str len (returns the number of characters of a string)
- theordinal (returns "first" from 1, "second" from 2, etc.)
- theplural (returns "suffixes" from suffix, "verbs" from verb, etc.)
- navbox (generates a collapsible box)
- ! (returns a vertical pipe: |)
- !! (returns two vertical pipes: ||)
- (! (returns a left brace followed by a vertical pipe: {|)
- !) (returns a vertical pipe followed by a right brace: |})
- !- (returns a vertical pipe followed by a dash: |-)
Languages, families and scripts:
- langname (same as above, but also returns a language name from the same language name)
- languagex (returns the language name from any language code)
- langnamex (same as above, but also returns a language name from the same language name)
- langrev (returns the language code of a given language name)
- languageshift (differentiates between "American Sign Language" and "American Sign Language language", among other related languages)
- langfamily (returns the language family from a language code)
- family (returns the family from a subfamily)
- script (returns a script name from a script code)
- scriptrev (returns a script code from a script name)
Pages:
- langprefix (returns the prefix, like conl:, of a language template)
- catlangcode (returns the name of a topical category, notably by never displaying the code en:)
- catlangname (returns the name of a lexical or other category similarly named)
- deftempboiler (generates a definition template)
- edit (generates an "edit" button)