Module:Wikidata label
Appearance
This module's documentation is missing, inadequate, or does not accurately describe its functionality and/or the parameters in its code. Please help to expand and improve it. |
Usage
[සංස්කරණය]{{#invoke:Wikidata label|function_name}}
local p = {}
function p.label( 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