Difference between revisions of "Template:Label"
Jump to navigation
Jump to search
wd>Jarekt |
m (1 revision imported: Import of useful Templates and Modules from Wikidata) |
(No difference)
|
Latest revision as of 20:47, 6 January 2022
50px Template:Documentation/getText[[[Template:Label/doc|Template:Documentation/getText]] · [[Special:EditPage/Template:Label/doc|Template:Documentation/getText]] · [[Special:PageHistory/Template:Label/doc|Template:Documentation/getText]] · ]
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'''}}
Page Module:Message box/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "CSS").
Template:Documentation/getText Template:Documentation/getText Template:Documentation/getText Template:Documentation/getText |