Difference between revisions of "Template:Label"
Jump to navigation
Jump to search
Mediawiki>Jeblad (Created page with "{{#invoke:Wikibase signature|label}}<noinclude> {{documentation}} </noinclude>") |
Wikimedia Commons>4nn1l2 m (Changed protection level for "Template:Label": downgraded protection level per consensus ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))) |
||
Line 1: | Line 1: | ||
− | {{#invoke: | + | {{#if:{{{item|{{{1|}}} }}}| |
− | {{ | + | {{#invoke:Wikidata label|getLabel |
− | </noinclude> | + | |item={{{item|{{{1|}}} }}} |
+ | |lang={{{lang|{{{2|{{int:lang}} }}} }}} | ||
+ | |link={{{link|wikipedia}}} | ||
+ | |capitalization={{{capitalization|none}}} | ||
+ | }} | ||
+ | }}<noinclude>{{Documentation}}</noinclude> |
Revision as of 03:43, 16 July 2019
![]() | This template uses Lua: |
This template gets the label of an item or property, and should stay in sync with the same template as d:Template:Label.
Examples:
{{label|Q1}}
: Lua error in Module:Wikidata_label at line 69: attempt to index field 'wikibase' (a nil value).{{label|Q1|en}}
: Lua error in Module:Wikidata_label at line 69: attempt to index field 'wikibase' (a nil value).{{label|Q1|es}}
: Lua error in Module:Wikidata_label at line 69: attempt to index field 'wikibase' (a nil value).{{label|P31}}
: Lua error in Module:Wikidata_label at line 69: attempt to index field 'wikibase' (a nil value).
The language code parameter is optional; if not provided it will default to the local language.