Module:Irish/VocabularyTable

local p = {};

p.FloatingTable = function(frame)
	local returnString = "{| \n|- \n|foo \n|bar  \n|}"
	local returnTable = p.FloatingTableHeader()
	
	local term = ""
	local i = 0;
	
	for index, value in pairs(frame.args) do
		
		if(i == 0) then
			term = value
			i = 1
		else
			returnTable = returnTable .. p.FloatingTableRow(term, value)
			i = 0
		end
	
	end
	
	returnTable = returnTable .. p.FloatingTableFooter()
	
	return returnTable
	
	
	
end

p.FloatingTableHeader = function(frame)
	return "{| class=\"wikitable floatright\"\n |-\n!colspan=3 style=\"background:lightgreen\" |Vocabulary\n" 
end

p.FloatingTableFooter = function(frame)
	return "|}"
end

p.FloatingTableRow = function(term1, term2)
	local returnValue = "|- \n|" .. term1 .. "\n|" .. term2 .. "\n"
	local returnValue = returnValue .. "| [https://www.teanglann.ie/en/fuaim/" .. term1 .. " pronunciation]\n"
	return returnValue	
end

return p