ទំព័រគំរូ:langscript/doc
This template returns a script code from a language code.
Usage
កែប្រែThis template should be implemented into other templates, wherever an automatic script is necessary.
There are two foreseen instances where an automatic script code is used.
- Organization.
- Example: Categorizing the English language as written in the Latin script.
- Formatting.
- Example: Formatting Russian language characters with the appropriate Cyrillic fonts automatically.
Parameters
កែប្រែThis template requires only one unnamed parameter.
- When a language is written in only one script, the sole parameter is the language code.
- When a language is written in two or more scripts, the sole parameter is the language code to return a standard script; or, the language code closely followed by a number to return other scripts.
Examples
កែប្រែ- English
- The English language is written in the Latin script.
- The English language is represented by the code en.
- The Latin script is represented by the code Latn.
- Therefore, {{langscript|en}} returns Latn.
- Portuguese
- The Portuguese language is written in the Latin script.
- The Portuguese language is represented by the code pt.
- The Latin script is represented by the code Latn.
- Therefore, {{langscript|pt}} returns Latn.
- Russian
- The Russian language is written in the Cyrillic script.
- The Russian language is represented by the code ru.
- The Cyrillic script is represented by the code Cyrl.
- Therefore, {{langscript|ru}} returns Cyrl.
- Serbo-Croatian
- The Serbo-Croatian language is written in the Cyrillic and the Latin scripts.
- The Serbo-Croatian language is represented by the code sh.
- The Cyrillic script is represented by the code Cyrl.
- The Latin script is represented by the code Latn.
- Therefore, {{langscript|sh}} returns Cyrl.
See also
កែប្រែSupplementary templates [edit]
Contents, text, tables:
- 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:
- Module:language utilities
- langname (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)
- 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:
- 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)