Content deleted Content added
Tobias1984 (talk | contribs) add i18n local |
Tobias1984 (talk | contribs) add p.desription |
||
Line 41:
["monolingualtext"] = '<span lang="%language">%text</span>'
}
function p.descriptionIn(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 description of a Wikidata entity in the given language or the default language of this Wikipedia site
return mw.wikibase.getEntityObject(id).descriptions[langcode or wiki.langcode].value
end
-- This is used to get a value, or a comma separated list of them if multiple values exist
|