Jump to content

Module:sjd-translit

ពីWiktionary

Documentation for this module may be created at Module:sjd-translit/doc

local export = {}

local tt = {
	["А"]='A', ["а"]='a',
	["Ӓ"]="Ja", ["ӓ"]="ja",
	["Б"]='B', ["б"]='b',
	["В"]='V', ["в"]='v',
	["Г"]='G', ["г"]='g',
	["Д"]='D', ["д"]='d',
	["Е"]='Je', ["е"]='je',
	["Ё"]="Jo", ["ё"]="jo",
	["Ж"]='Ž', ["ж"]='ž',
	["З"]='Z', ["з"]='z',
	["Һ"]="H", ["һ"]="h", ["ʼ"]="h",
	["И"]='I', ["и"]='i',
	["Ӣ"]="Ī", ["ӣ"]="ī",
	["Й"]="J", ["й"]="j",
	["Ј"]="J̥", ["ј"]="j̥", ["Ҋ"]="J̥", ["ҋ"]="j̥",
	["К"]='K', ["к"]='k',
	["Л"]='L', ["л"]='l',
	["Ӆ"]='L̥', ["ӆ"]='l̥',
	["М"]='M', ["м"]='m',
	["Ӎ"]="M̥", ["ӎ"]="m̥",
	["Н"]='N', ["н"]='n',
	["Ӊ"]="N̥", ["ӊ"]="n̥",
	["Ӈ"]="Ŋ", ["ӈ"]="ŋ",
	["О"]='O', ["о"]='o',
	["П"]='P', ["п"]='p', 
	["Р"]='R', ["р"]='r',
	["Ҏ"]="R̥", ["ҏ"]="r̥",
	["С"]='S', ["с"]='s',
	["Т"]='T', ["т"]='t',
	["У"]='U', ["у"]='u', 
	["Ӯ"]="Ū", ["ӯ"]="ū",
	["Ф"]='F', ["ф"]='f',
	["Х"]='X', ["х"]='x',
	["Ц"]='C', ["ц"]='c',
	["Ч"]='Č', ["ч"]='č',
	["Ш"]='Š', ["ш"]='š',
	["Щ"]="Šč", ["щ"]="šč",
	["Ы"]="Ɨ", ["ы"]="ɨ",
	["Ъ"]="", ["ъ"]="",
	["Ь"]="ʹ", ["ь"]="ʹ", ["Ҍ"]="ʹ", ["ҍ"]="ʹ",
	["Э"]="E", ["э"]="e",
	["Ӭ"]="Je", ["ӭ"]="je",
	["Ю"]="Ju", ["ю"]="ju",
	["Я"]="Ja", ["я"]="ja",
}

function export.tr(text, lang, sc)
	return (mw.ustring.gsub(text, '.', tt))
end

return export