Dokumentizo por ica modulo povas kreesar ye Modulo:tradukuri/dokumentado

local export = {}

function export.show(frame)
	local translations = frame:getParent().args
	local list = ""

	sections = {}
	sections[1] = {"", {"en", "fr", "de", "es", "it", "ru"}}
	sections[2] = {"A", {"af", "sq", "ar", "an", "hy", "ast", "ay", "az"}}
	sections[3] = {"B", {"eu", "be", "bs", "br", "bg"}}
	sections[4] = {"C", {"ce", "cs", "zh", "cv"}}
	sections[5] = {"D", {"da"}}
	sections[6] = {"E", {"myv", "eo", "et"}}
	sections[7] = {"F", {"fi", "fy"}}
	sections[8] = {"G", {"gl", "ka", "el"}}
	sections[9] = {"H", {"haw", "he", "hi", "hu"}}
	sections[10] = {"I", {"id", "ia", "ie", "ga", "is"}}
	sections[11] = {"J", {"ja"}}
	sections[12] = {"K", {"ca", "kv", "ko", "co", "hr", "ku"}}
	sections[13] = {"L", {"se", "la", "lv", "lt", "jbo", "lb"}}
	sections[14] = {"M", {"mk", "mg", "ms", "mhr", "mdf", "mn"}}
	sections[15] = {"N", {"nl", "no", "nn", "nov"}}
	sections[16] = {"O", {"oc", "om"}}
	sections[17] = {"P", {"fa", "pms", "pl", "pt"}}
	sections[18] = {"Q", {"qu"}}
	sections[19] = {"R", {"ro"}}
	sections[20] = {"S", {"sr", "scn", "sco", "sk", "sl", "so", "nso", "sv", "sw"}}
	sections[21] = {"T", {"tl", "th", "tt", "tok", "tr"}}
	sections[22] = {"U", {"udm", "uk"}}
	sections[23] = {"V", {"vi", "vo"}}
	sections[24] = {"W", {"cy", "war"}}
	sections[25] = {"X", {"xh"}}
	sections[26] = {"Y", {"yi", "yo"}}
	sections[27] = {"Z", {"zu"}}

	for key1,section in pairs(sections) do
		local printHeader = false

		for key2,language in pairs(section[2]) do
			if translations[language] ~= nil and translations[language] ~= "" then
				if printHeader == false then
					if section[1] == "" then
						list = list .. "===[[Wikivortaro:Fonto-lingui|Fonto-lingui]]===\n<div style=\"background-color:#f9f9f9;column-width:26em;-webkit-column-width:26em;-moz-column-width:26em\">\n"
					else
						list = list .. "===<sup><small>Altra lingui " .. section[1] .. "</sup></small>===\n<div style=\"background-color:#f9f9f9;column-width:26em;-webkit-column-width:26em;-moz-column-width:26em\">\n"
					end
					printHeader = true
				end

				list = list .. "*" .. frame:expandTemplate{title = language} .. ": " .. translations[language] .. "\n"
			end
		end

		list = list .. "</div>\n"
	end

	return list
end

return export