Module:dlg-translit

local export = {}

local tab = { ["А"]='A', ["а"]='a', ["Б"]='B', ["б"]='b', ["Г"]='G', ["г"]='g', ["Ҕ"]='Ǧ', ["ҕ"]='ǧ', ["Д"]='D', ["д"]='d', ["И"]='I', ["и"]='i', ["Й"]='J', ["й"]='j', ["К"]='K', ["к"]='k', ["Л"]='L', ["л"]='l', ["М"]='M', ["м"]='m', ["Н"]='N', ["н"]='n', ["Ӈ"]='Ŋ', ["ӈ"]='ŋ', ["О"]='O', ["о"]='o', ["Ө"]='Ö', ["ө"]='ö', ["П"]='P', ["п"]='p', ["Р"]='R', ["р"]='r', ["С"]='S', ["с"]='s', ["Һ"]='H', ["һ"]='h', ["Т"]='T', ["т"]='t', ["У"]='U', ["у"]='u', ["Ү"]='Ü', ["ү"]='ü', ["Х"]='X', ["х"]='x', ["Ч"]='Č', ["ч"]='č', ["Ш"]='Š', ["ш"]='š', ["Ы"]='Y', ["ы"]='y', ["Э"]='E', ["э"]='e', -- non-native letters ["В"]='V', ["в"]='v', ["Е"]='Je', ["е"]='je', ["Ё"]='Jo', ["ё"]='jo', ["Ж"]='Ž', ["ж"]='ž', ["З"]='Z', ["з"]='z', ["Ф"]='F', ["ф"]='f', ["Ц"]='C', ["ц"]='c', ["Щ"]='Ŝ', ["щ"]='ŝ', ['Ъ']='ʺ', ['ъ']='ʺ', ["Ь"]="’", ["ь"]="’", ["Ю"]='Ju', ["ю"]='ju', ["Я"]='Ja', ["я"]='ja', }

function export.tr(text, lang, sc) text = mw.ustring.gsub(text, 'Дь', 'Ď') text = mw.ustring.gsub(text, 'дь', 'ď') text = mw.ustring.gsub(text, 'Нь', 'Ń') text = mw.ustring.gsub(text, 'нь', 'ń') return (mw.ustring.gsub(text,'.',tab)) end

return export