Module:Label
Appearance
Documentation for this module may be created at Module:Label/doc
local p = {}
function p.label( frame )
return mw.wikibase.label( frame.args[1] )
end
function p.labelForId( frame )
return mw.wikibase.label( frame.args[1] )
end
function p.labelForLang( frame )
local langcode = frame.args[1]
local id = frame.args[2] -- "id" must be nil, as access to other Wikidata objects is disabled in Mediawiki configuration
return mw.wikibase.getEntityObject(id).labels[langcode].value
end
return p