Пређи на садржај

Модул:languages/byTranslitModule

Script error: The function "main" does not exist.

return function(translitModule)
	local langs = {}
	
	for code, data in pairs(require("Модул:languages/data/all")) do
		if data.translit == translitModule then
			langs[code] = data
		elseif type(data.translit) == "table" then
			for script, translit_data in pairs(data.translit) do
				if translit_data == translitModule then
					langs[code] = data
				end
			end
		end
	end
	
	local result = {}
	local i = 0
	for code, data in pairs(langs) do
		i = i + 1
		result[i] = require("Модул:languages").makeObject(code, data)
	end
	
	return result
end