Template:Lang
This template is used on a very large number of pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in the template's /sandbox or /testcases subpages, or in your own user space. The tested changes can then be added in one single edit to the template. Please consider discussing any changes on the talk page before implementing them. |
Using this template, a specific language code can be specified in the HTML code.
Usage
{{Lang|1=|2=}}
This template is for example called from autotranslatable templates and is used to apply the “lang” attribute to a “div” tag by default, or other tag if specified, containing the text. Wikidata, like Commons and other multilingual Wikimedia projects, requires support for this template on both blocks of text and inline strings of text. “div” works for text blocks, but “span” is necessary for any inline uses of this template. It also adds CSS classes, that for example allow CSS highlighting text that is in a specific language. For a list of language codes to use for parameter 1 see List of ISO 639-1 codes.
Parameters
Parameter name | Description | Default value | required or optional?
|
---|---|---|---|
parameter #1 (1) | used language code in ISO 639-1 (two-letter) format | empty | required |
parameter #2 (2) | Text in the used language code | empty | optional |
tag | Possible HTML tags:
|
div | optional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Example
{{Lang|1=de|2=Dies ist ein Beispiel.}}
renders as:
See also
{{Language}}
Localization
This template is not intended to be localized.
The above documentation is transcluded from Template:Lang/doc (edit | history). Editors can experiment in this template's sandbox (edit | diff) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |