Template:ItemLC/doc
Jump to navigation
Jump to search
| This is a documentation subpage for Template:ItemLC. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
This template is a wrapper for the function getItemLangCode in Module:WikidataIB
It takes one optional unnamed parameter, the qid for a Wikidata entity. If the parameter is omitted, it uses the qid of the Wikidata entity associated with the current page.
- If the item for that qid has property Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P17), it looks at the Wikidata entry for the first preferred value for the country.
- If the country has an Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P37), it looks at the Wikidata entry for the first preferred value for the official language.
- If that official language has a Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P424), it returns the first preferred value of the code.
- Otherwise it returns nothing.
Example
For Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q693330) (which is in Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q189):
{{ItemLC|Q693330}}→ Lua error in Module:WikidataIB at line 177: attempt to index field 'wikibase' (a nil value).