As a Wikipedia editor, I want to get all labels of a Wikidata item, in order to be able to describe an item not just in the content language of my wiki, but also in several other minority languages it covers.
Wikidata includes support for several custom language codes, by setting $wmgExtraLanguageNames in InitialiseSettings.php (warning, large file, may slow down your browser). However, those language codes are only defined for Wikidata (test and real) and Commons; on client wikis, Wikibase does not consider them to be valid, and therefore refuses to return labels in those languages, even if they’re defined on Wikidata. See discussion on Project_chat#Kven
Swedish Wikipedia would like to use the smj label of Tysfjord (Q493851), or the fkv label of Porsanger (Q483885). The following work snippets work in a Lua sandbox on Wikidata, but not in a Lua sandbox on Swedish Wikipedia:
=mw.wikibase.getLabelByLang( 'Q493851', 'smj' ) =mw.wikibase.getLabelByLang( 'Q483885', 'fkv' )
- Labels in languages from $wmgExtraLanguageNames can be used on client wikis