Module:languages/byTranslitModule

Hello, you have come here looking for the meaning of the word Module:languages/byTranslitModule. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:languages/byTranslitModule, but we will also tell you about its etymology, its characteristics and you will know how to say Module:languages/byTranslitModule in singular and plural. Everything you need to know about the word Module:languages/byTranslitModule you have here. The definition of the word Module:languages/byTranslitModule will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:languages/byTranslitModule, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Returns a function that generates a list of all the languages that use a given transliteration module. Used by {{translit module documentation}} and {{module cat}}.

Receives the name of a module (minus the namespace Module:) and returns a table (array) of language objects.

require("Module:languages/byTranslitModule")("sa-translit") --> table containing objects for Sanskrit (sa), Punjabi (pa), Old Marathi (omr), Old Hindi (inc-ohi)

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