Template:Lang
<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.