Modul:languages/bySortkeyModule

A modult a Modul:languages/bySortkeyModule/doc lapon tudod dokumentálni

return function(sortkeyModule)
	local langs = {}
	
	for code, data in pairs(require("Module:languages/data/all")) do
		if data.sort_key == sortkeyModule then
			langs[code] = data
		elseif type(data.sort_key) == "table" then
			for script, sortkey_data in pairs(data.sort_key) do
				if sortkey_data == sortkeyModule 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("Module:languages").makeObject(code, data)
	end
	
	return result
end