Jump to content

Module:Italian regions

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MSGJ (talk | contribs) at 20:24, 24 April 2018 (start). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local getArgs = require('Module:Arguments').getArgs
local data = {
	ABR = {name="Abruzzo", coa=""},
}
require('Module:No globals')

function p.main(frame)
	local args = getArgs(frame)
	local p_data = data[args[1]]
	local config = frame.args
	if p_data then
		if config.link=='false' then
			return p_data.name
		else
			return '[[' .. p_data.name .. ']]'
		end
	end
end

function p.coat_of_arms(frame)
	local args = getArgs(frame)
	local p_data = data[args[1]]
	if p_data then
		return p_data.coa
	end
end

return p