Difference between revisions of "Template:Lang/doc"
(New template document) |
m (Added to Category:Language templates) |
||
Line 32: | Line 32: | ||
} | } | ||
</templatedata> | </templatedata> | ||
+ | <includeonly>[[Category:Language templates]]</includeonly> |
Revision as of 01:48, 3 February 2021
The purpose of this template is to indicate that a span of text belongs to a particular language.
Usage
{{lang|language tag|text}}
The language tag should consist of an ISO 639 language code.
The ISO 639 language code is a two- or three-letter abbreviation, in lowercase, of the language's name. Japanese, for example, has the code ja
:
{{lang|ja|蓬莱山輝夜}}
→ 蓬莱山輝夜
Template data
<templatedata> { "params": { "1": { "label": "Language tag", "description": "A language tag, or an ISO 639 language code.", "example": "ja", "type": "string", "required": true }, "2": { "label": "Text", "description": "The text belonging to the language specified.", "type": "string", "required": true, "example": "蓬莱山輝夜" } }, "description": "Indicate that a given span of text belongs to a particular language. Allows browsers to correctly present and pronounce foreign languages." } </templatedata>