Module:Beng-Deva-translit

local gsub = mw.ustring.gsub

local export = {}

local conv = { -- consonants ['ক']='क', ['খ']='ख', ['গ']='ग', ['ঘ']='घ', ['ঙ']='ङ', ['চ']='च', ['ছ']='छ', ['জ']='ज', ['ঝ']='झ', ['ঞ']='ञ', ['ট']='ट', ['ঠ']='ठ', ['ড']='ड', ['ঢ']='ढ', ['ণ']='ण', ['ত']='त', ['থ']='थ', ['দ']='द', ['ধ']='ध', ['ন']='न', ['প']='प', ['ফ']='फ', ['ব']='ब', ['ভ']='भ', ['ম']='म', ['য']='य', ['র']='र', ['ল']='ल', ['ল়']='ळ', ['শ']='श', ['ষ']='ष', ['স']='स', ['হ']='ह', ['ড়']='ड़', ['ঢ়']='ढ़', ['য়']='य़', ['ৎ']='त्',

-- maatra ['া']='ा', ['ি']='ि', ['ী']='ी', ['ু']='ु', ['ূ']='ू', ['ৃ']='ृ', ['ৄ']='ॄ',	['ৢ']='ॢ', ['ৣ']='ॣ', ['ে']='े', ['ৈ']='ै', ['ো']='ो', ['ৌ']='ौ', ['্']='्', ['়']='़',

-- vowels ['অ']='अ', ['আ']='आ', ['ই']='इ', ['ঈ']='ई', ['উ']='उ', ['ঊ']='ऊ', ['ঋ']='ऋ', ['ৠ']='ॠ', ['ঌ']='ऌ', ['ৡ']='ॡ', ['এ']='ए', ['ঐ']='ऐ', ['ও']='ओ', ['ঔ']='औ', -- chandrabindu ['ঁ']='ँ',	-- anusvara ['ং']='ं',	-- visarga ['ঃ']='ः',	-- avagraha ['ঽ']='ऽ', --punctuation ['॥']='॥',	['।']='।',	['ওঁ']='ॐ', --Vedic extensions ['ᳵ']='ᳵ', ['ᳶ']='ᳶ',

['০']='०', ['১']='१', ['২']='२', ['৩']='३', ['৪']='४', ['৫']='५', ['৬']='६', ['৭']='७', ['৮']='८', ['৯']='९' }

function export.tr(text, lang, sc, noNuqta) text = text:gsub("্ব", "्व")

-- Nuqta is not used in Devanagari Sanskrit. if noNuqta and lang ~= "sa" then text = text:gsub("ড়", "ড") :gsub("ঢ়", "ঢ") :gsub("য়", "য") end

text = gsub(		text,		".",		function(c)			return conv[c]		end)

return text end return export