Module:en-ta-translit

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

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}
 
local consonants = {
	='க', ='க', ='ங', ='ச', ='ஞ', ='ட', ='ட', ='ட', ='ண', 
	='த', ='த', ='ந', ='ப', ='ப', ='ம', ='ய', ='ர' , ='ல' , ='வ' ,
	='ழ' , ='ள' , ='ற' , ='ன' , ='ஶ' , ='ஜ' , ='ஷ' , 
	='ஸ' , ='ஹ' , ='ஃப' , ='ஃஜ' , ='ஃஸ' ,
}

local diacritics = {
	 = 'ை',  = 'ௌ', 
	 = '' ,
	= 'ா' , ='ி' , ='ீ' , ='ு' , ='ூ' ,  ='ெ' ,
	='ே' , ='ொ' , ='ோ' , 
}

local nonconsonants = {
	='ஔ' , ='ஐ' ,
	='அ' , ='௦' , ='ஆ' , ='இ' , ='ஈ' , ='உ' , ='ஊ' , 
	='எ' , ='ஏ' ,  ='ஒ' , ='ஓ' ,  ='ஃ' ,
	='௧' , ='௨' , ='௩' , ='௪' , ='௫' , ='௬' , ='௭' , ='௮' , ='௯' ,
}

-- translit any words or phrases
function export.tr(text, lang, sc)
		text = mw.ustring.gsub(
		text,
		'()'..
		'(a?)',
		function(c, d)
			if d ~= "" then  
				return consonants .. diacritics
			end
		end)
	text = mw.ustring.gsub(
		text,
		'()'..
		'(?)',
		function(c, d)
			if d ~= "" then  
				return consonants .. diacritics
			else
				return consonants .. '்'
			end
		end)
		text = mw.ustring.gsub(text,'(a?)', function(a)
			if a ~= "" then  
				return nonconsonants
			end
		end)
	text = mw.ustring.gsub(text, '.', nonconsonants)
	
	return text
end
 
return export