Template:Lang: Difference between revisions
(Created page with "<includeonly><span lang="{{{1}}}" xml:lang="{{{1}}}" style="font-family: Arial Unicode MS, Arial, Code2000, New Athena Unicode, Palatino Linotype, Gentium, Athena Unicode; fon...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span lang="{{{1}}}" xml:lang="{{{1}}}" style="font-family: Arial Unicode MS, Arial, Code2000, New Athena Unicode, Palatino Linotype, Gentium, Athena Unicode; font-size: | <includeonly><span lang="{{{1}}}" xml:lang="{{{1}}}" style="font-family: Arial Unicode MS, Arial, Code2000, New Athena Unicode, Palatino Linotype, Gentium, Athena Unicode; font-size:100%;">{{{2}}}</span></includeonly><noinclude>{{Documentation}}</noinclude> | ||
<noinclude>{{ |
Latest revision as of 15:51, 6 October 2021
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
This template is integrated many times. If you know exactly what the effects are, you can edit it. In most cases, however, it makes sense to first vote on change requests on Template Discussion. |
Syntax and usage
{{lang|language tag|text}}
The language tag should consist of an ISO 639 language code. The template supports properly formatted IETF language tags using subtags that identify the language's script, region, and/or variant. The ISO 639 language code is a two- or three-letter abbreviation, in lowercase, of the language's name. French, for example, has the code fr
:
She said: "{{lang|fr|Je suis française.}}"
→ She said: "Je suis française."
Because all languages represented by two-letter codes in ISO 639-1 can also be represented by their three-letter equivalents in ISO 639-2 and above, it is recommended to use the shortest language tag possible that sufficiently describes the target language.[1] So while French could be represented by 639‑2's fra
code, use the 639‑1 code fr
instead. Likewise, script, region, and variant information should be included only when they provide a necessary distinction. For an up-to-date list of available language, script, region, and variant codes, please refer to the IANA's language subtag registry.