Module:User:Dixtosa

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


local export = {}

function string.starts(String,Start)
   return string.sub(String,1,string.len(Start))==Start
end

--Entry point
function export.GetLangNameToLangCodeMapping(prefix)
	local byName = mw.loadData("Module:languages/by name")
	
	local found_code = nil
	local found_name = nil
	for name, code in pairs(byName) do
		if (string.starts(name, prefix.args)) then 
			if found_code == nil or found_code == code then
				found_code = code
				found_name = name
			else
				return ""
			end
		end
	end
	if found_code ~= nil then
		return found_code..":"..found_name
	else 
		return "" end
end

function export.GetAllData()
	local byName = mw.loadData("Module:languages/by name")
	return require("Module:JSON").toJSON(byName)
end

return export