Modul:Deva-Tirh-translit

A modult a Modul:Deva-Tirh-translit/doc lapon tudod dokumentálni

local export = {}

local conv = {
	['क']='𑒏', ['ख']='𑒐', ['ग']='𑒑', ['घ']='𑒒', ['ङ']='𑒓',
	['च']='𑒔', ['छ']='𑒕', ['ज']='𑒖', ['झ']='𑒗', ['ञ']='𑒘', 
	['ट']='𑒙', ['ठ']='𑒚', ['ड']='𑒛', ['ढ']='𑒜', ['ण']='𑒝',
	['त']='𑒞', ['थ']='𑒟', ['द']='𑒠', ['ध']='𑒡', ['न']='𑒢', 
	['प']='𑒣', ['फ']='𑒤', ['ब']='𑒥', ['भ']='𑒦', ['म']='𑒧',
	['य']='𑒨', ['र']='𑒩', ['ल']='𑒪', ['व']='𑒫', ['ळ']='𑒪𑓃',
	['श']='𑒬', ['ष']='𑒭', ['स']='𑒮', ['ह']='𑒯',

	['ा']='𑒰', ['ि']='𑒱', ['ी']='𑒱', ['ु']='𑒳', ['ू']='𑒴', ['ृ']='𑒵', ['ॄ']='𑒶',
	['ॢ']='𑒷', ['ॣ']='𑒸', ['े']='𑒹', ['ै']='𑒻', ['ो']='𑒼', ['ौ']='𑒾',  ['्']='𑓂', ['़']='𑓃',

	-- vowels
	['अ']='𑒁', ['आ']='𑒂', ['इ']='𑒃', ['ई']='𑒄', ['उ']='𑒅', ['ऊ']='𑒆', ['ऋ']='𑒇', ['ॠ']='𑒈',
	['ऌ']='𑒉', ['ॡ']='𑒊', ['ए']='𑒋', ['ऐ']='𑒌', ['ओ']='𑒍', ['औ']='𑒎', 
	-- chandrabindu    
	['ँ']='𑒿',
	-- anusvara    
	['ं']='𑓀',
	-- visarga    
	['ः']='𑓁',
	-- avagraha
	['']='𑓄',
	--punctuation
	['॰']='𑓆'      ,
    ['॥']='॥',
	['।']='।',
	['ॐ']='𑓇'
}

function export.tr(text, lang, sc)
	text = mw.ustring.gsub(
		text,
		".",
		function(c)
			return conv[c]
		end)

	return text
end
 
return export