Template:Label/doc
Jump to navigation
Jump to search
Page Module:Message box/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "CSS").
30px | Uses Lua: |
This template returns the label for a particular entity (item or property), using Module:Wikidata label.
Usage
{{Label|1=|2=|link=|capitalization=}}
Parameters
Parameter name | Description | Default value | required or optional?
|
---|---|---|---|
parameter #1 (1) | Wikidata item ID number in form "Q" + item number. Also works with Wikidata properties if you use "P"+number. |
empty | required |
parameter #2 (2) | Language code (only needs to be provided if the language displayed is to be fixed and independent of the user’s preferences). | empty | optional |
link | link type: wikipedia will try to link to Wikipedia (does not work for properties) wikidata to Wikidata wikidata talk to Wikidata talk page commons to Commons (does not work for properties) - means no link. The code will try first the link of your choice then if not possible it will fallback and try linking to Wikipedia, and if that is not possible than to Wikidata. |
- | optional |
capitalization | can be: uc: upper case lc: lower case ucfirst: upper case for the first letter lcfirst: lower case for the first letter none: to leave it as is |
none | optional |
show_id | if set to 1 than item ID will be displayed after the label | none | 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
Relies on:
Module:Wikidata label
Examples 1
|
|
Examples 2
- Hello World (Q1)
{{Label | Q1 }}
→ Hello World{{Label | Q1 | en }}
→ Hello World{{Label | Q1 | es }}
→ Hello World{{Label | Q1 | ru }}
→ Hello World{{Label | Q1 | ja }}
→ Hello World
- modified (P31)
{{Label | P31 }}
→ modified{{Label | P31 | en }}
→ modified{{Label | P31 | es }}
→ modified{{Label | P31 | ru }}
→ modified{{Label | P31 | ja }}
→ modified
- P279 (P279)
{{Label | Property:P279 }}
→ P279{{Label | Property:P279 | en }}
→ P279{{Label | Property:P279 | es }}
→ P279{{Label | Property:P279 | ru }}
→ P279{{Label | Property:P279 | ja }}
→ P279
See also
{{Autodescription}}
{{A}}
{{Data}}
{{EntitySchema}}
{{E}}
{{Label}}
- Media URL
{{LinkedLabel}}
{{Label and description}}
{{LD}}
- Template:LD
{{Q}}
{{Q+}}
{{Q'}}
{{Q''}}
{{Q'''}}