Ravêr zerreki

Modul:Infobox/Localdata

Wikipediya, ensiklopediya xosere ra
Vurnayışo ke 20:30, 30 Tebaxe 2018 de terefê Azminwan (werênayış | iştıraki) (Perra Newiye: local localdata = {} local wikidata = require('Module:Wikidata') local frame = mw.getCurrentFrame() local modulename = frame.args.nom local parent = frame:getParent() or frame loc...) ra biyo
(ferq) ←Viyarnayışo kıhanêr | Viyarnayışo peyên (ferq) | Viyarnayışo neweyêr→ (ferq)

Seba na module şıma şenê yû pela dokumani vırazê Modul:Infobox/Localdata/dok

local localdata = {}

local wikidata = require('Module:Wikidata')
local frame = mw.getCurrentFrame()
local modulename =  frame.args.nom
local parent = frame:getParent() or frame
local templatename = parent:getTitle() -- au cas où il soit différent du nom du module
local params = parent.args

-- fill-up global variable localdata using params
for i, j in pairs(params) do
	if j and mw.text.trim(j) ~= '' then -- empty parameters are ignored
		localdata[i] = j
	end
end
localdata.templatename = templatename
localdata.modulename = modulename

-- load wikidata item:
localdata.item = wikidata.getEntity(localdata.wikidata)

return localdata