Difference between revisions of "Template:Lang2iso"

From blackwiki
Jump to navigation Jump to search
imported>Largoplazo
(Adding Azeri as alternative to Azerbaijani.)
imported>Largoplazo
(Funny, Raeto-Romance was there but I've always seen it with "Rh". Adding alternative.)
Line 248: Line 248:
 
| Tarifit=rif
 
| Tarifit=rif
 
| Raeto-Romance=rm
 
| Raeto-Romance=rm
 +
| Rhaeto-Romance=rm
 
| Vlax Romani=rmy
 
| Vlax Romani=rmy
 
| Kirundi=rn
 
| Kirundi=rn

Revision as of 14:52, 19 May 2015

en

Template documentation[view] [edit] [history] [purge]

Template:Lang2iso takes an English-language language name (such as "Abkhazian" or "Sinhalese") and converts it into a two-letter ISO 639 language code. This table's values are based on List of ISO 639-1 codes. The template should not be transcluded directly from article namespace.

Examples

Purpose

Since most users will know a language's name but not its ISO code, this template is meant to facilitate invocations of other templates such as Template:Lang. Thus, instead of recalling (or having to know) that the ISO code for German is "de" and transcluding {{Lang|de|Mädchen}}, one can type: {{Lang|{{subst:Lang2iso|German}}|Mädchen}}.

This also reduces the number of parameters that need to be passed to some language routines (such as those similar to Template:Language with name) since the ISO language code can now be derived from the ISO language name.

See also