Template:ItemLC/doc

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, it looks at the Wikidata entry for the first preferred value for the country.
 * If the country has an, it looks at the Wikidata entry for the first preferred value for the official language.
 * If that official language has a, it returns the first preferred value of the code.
 * Otherwise it returns nothing.

Example
For (which is in :