Template:Label/doc: Difference between revisions
Appearance
Content deleted Content added
remove cats from sandbox |
Update examples, remove notes about syncing with Wikidata:Template:Label and displaying labels in other languages (this template uses a different module and doesn't support language feature) |
||
Line 1: | Line 1: | ||
{{ |
{{Documentation subpage}} |
||
{{Lua|Module:Wikibase}} |
{{Lua|Module:Wikibase}} |
||
This template gets the label of |
This template gets the label of a [[Wikidata]] item or property. |
||
== Usage examples == |
|||
Examples: |
|||
*<code><nowiki>{{label|Q5}}</nowiki></code>: {{label|Q5}}<!-- |
|||
*<code><nowiki>{{label|Q5|en}}</nowiki></code>: {{label|Q5|en}} |
|||
*<code><nowiki>{{label|Q5|es}}</nowiki></code>: {{label|Q5|es}}--> |
|||
⚫ | |||
; Standard usage |
|||
The language code parameter does not work yet. It will be optional; if not provided it will default to English. |
|||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|Q5}}</code> → {{{{BASEPAGENAME}}|Q5}} |
|||
⚫ | |||
; Leading/trailing whitespace |
|||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | Q5 }}</code> → {{{{BASEPAGENAME}} | Q5 }} |
|||
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | P31 }}</code> → {{{{BASEPAGENAME}} | P31 }} |
|||
== See also == |
|||
* [[Wikidata:Template:Label]] |
|||
<includeonly>{{#switch:{{SUBPAGENAME}}|sandbox=|#default= |
<includeonly>{{#switch:{{SUBPAGENAME}}|sandbox=|#default= |
Revision as of 08:57, 22 April 2017
This is a documentation subpage for Template:Label. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
This template gets the label of a Wikidata item or property.
Usage examples
- Standard usage
{{Label|Q5}}
→ human{{Label|P31}}
→ instance of
- Leading/trailing whitespace
{{Label | Q5 }}
→ human{{Label | P31 }}
→ instance of
See also