Modul:ady-translit

Wiktionary saytından

Bu modulun sənədləşdirmə səhifəsi Modul:ady-translit/doc səhifəsində yaradıla bilər

local export = {}

local tt = {
	["а"]="ā", ["б"]="b", ["в"]="v", ["г"]="γ", ["д"]="d", ["е"]="e", ["ё"]="ë", ["ж"]="ž",
	["з"]="z", ["и"]="i", ["й"]="j", ["к"]="k", ["л"]="l", ["м"]="m", ["н"]="n", ["о"]="o", 
	["п"]="p", ["р"]="r", ["с"]="s", ["т"]="t", ["у"]="w", ["ф"]="f", ["х"]="x", ["ц"]="c", 
	["ч"]="č", ["ш"]="š", ["щ"]="š̍", ["ъ"]="”", ["ы"]="ə", ["ь"]="’", ["э"]="ă", ["ю"]="ju",
	["я"]="jā", ["ӏ"]="ʾ", ["А"]="Ā", ["Б"]="B", ["В"]="V", ["Г"]="Γ", ["Д"]="D", ["Е"]="E", 
	["Ё"]="Ë", ["Ж"]="Ž", ["З"]="Z", ["И"]="I", ["Й"]="J", ["К"]="K", ["Л"]="L", ["М"]="M", 
	["Н"]="N", ["О"]="O", ["П"]="P", ["Р"]="R", ["С"]="S", ["Т"]="T", ["У"]="W", ["Ф"]="F", 
	["Х"]="X", ["Ц"]="C", ["Ч"]="Č", ["Ш"]="Š", ["Щ"]="Š̍", ["Ъ"]="”", ["Ы"]="Ə", ["Ь"]="’",
	["Э"]="Ă", ["Ю"]="Ju", ["Я"]="Jā", ["Ӏ"]="ʾ"};

function export.tr(text, lang, sc)
	text = mw.ustring.gsub(text, 'кхъу', 'q°')
	text = mw.ustring.gsub(text, 'Кхъу', 'Q°')
	text = mw.ustring.gsub(text, 'гъу', 'ġ°')
	text = mw.ustring.gsub(text, 'дзу', 'ʒ°')
	text = mw.ustring.gsub(text, 'жъу', 'ẑ°')
	text = mw.ustring.gsub(text, 'Кхъ', 'Q')
	text = mw.ustring.gsub(text, 'кхъ', 'q')
	text = mw.ustring.gsub(text, 'къу', 'q°')
	text = mw.ustring.gsub(text, 'кӏу', 'ḳ°')
	text = mw.ustring.gsub(text, 'пӏу', 'ṗ°')
	text = mw.ustring.gsub(text, 'тӏу', 'ṭ°')
	text = mw.ustring.gsub(text, 'хъу', 'χ°')
	text = mw.ustring.gsub(text, 'шъу', 'ŝ°')
	text = mw.ustring.gsub(text, 'шӏу', 'ṣ̂°')
	text = mw.ustring.gsub(text, 'гу', 'g°')
	text = mw.ustring.gsub(text, 'гь', 'ɡ’')
	text = mw.ustring.gsub(text, 'гъ', 'ġ')
	text = mw.ustring.gsub(text, 'дж', 'ǯ̍')
	text = mw.ustring.gsub(text, 'дз', 'ʒ')
	text = mw.ustring.gsub(text, 'жъ', 'ẑ')
	text = mw.ustring.gsub(text, 'жь', 'ž̍')
	text = mw.ustring.gsub(text, 'ку', 'k°')
	text = mw.ustring.gsub(text, 'къ', 'q')
	text = mw.ustring.gsub(text, 'кӏ', 'č̣̍')
	text = mw.ustring.gsub(text, 'лъ', 'ł')
	text = mw.ustring.gsub(text, 'лӏ', 'ḷ')
	text = mw.ustring.gsub(text, 'пӏ', 'ṗ')
	text = mw.ustring.gsub(text, 'сӏ', 'ṣ̣')
	text = mw.ustring.gsub(text, 'тӏ', 'ṭ')
	text = mw.ustring.gsub(text, 'фӏ', 'f̣')
	text = mw.ustring.gsub(text, 'ху', 'x°')
	text = mw.ustring.gsub(text, 'хъ', 'χ')
	text = mw.ustring.gsub(text, 'хь', 'ḥ')
	text = mw.ustring.gsub(text, 'цу', 'c°')
	text = mw.ustring.gsub(text, 'цӏ', 'c̣')
	text = mw.ustring.gsub(text, 'чӏ', 'č̣')
	text = mw.ustring.gsub(text, 'чу', 'č̍°')
	text = mw.ustring.gsub(text, 'чъ', 'č')
	text = mw.ustring.gsub(text, 'шъ', 'ŝ')
	text = mw.ustring.gsub(text, 'шӏ', 'ṣ̂')
	text = mw.ustring.gsub(text, 'ӏу', 'ʾ°')
	text = mw.ustring.gsub(text, 'ӏь', '՚̍')
	text = mw.ustring.gsub(text, 'Гъу', 'Ġ°')
	text = mw.ustring.gsub(text, 'Дзу', 'Ʒ°')
	text = mw.ustring.gsub(text, 'Жъу', 'Ẑ°')
	text = mw.ustring.gsub(text, 'Къу', 'Q°')
	text = mw.ustring.gsub(text, 'Кӏу', 'Ḳ°')
	text = mw.ustring.gsub(text, 'Пӏу', 'Ṗ°')
	text = mw.ustring.gsub(text, 'Тӏу', 'Ṭ°')
	text = mw.ustring.gsub(text, 'Хъу', 'Χ°')
	text = mw.ustring.gsub(text, 'Шъу', 'Ŝ°')
	text = mw.ustring.gsub(text, 'Шӏу', 'Ṣ̂°')
	text = mw.ustring.gsub(text, 'Гу', 'G°')
	text = mw.ustring.gsub(text, 'Гь', 'ɡ’')
	text = mw.ustring.gsub(text, 'Гъ', 'Ġ')
	text = mw.ustring.gsub(text, 'Дж', 'Ǯ̍')
	text = mw.ustring.gsub(text, 'Дз', 'Ʒ')
	text = mw.ustring.gsub(text, 'Жъ', 'Ẑ')
	text = mw.ustring.gsub(text, 'Жь', 'Ž̍')
	text = mw.ustring.gsub(text, 'Ку', 'K°')
	text = mw.ustring.gsub(text, 'Къ', 'Q')
	text = mw.ustring.gsub(text, 'Кӏ', 'Č̣̍')
	text = mw.ustring.gsub(text, 'Лъ', 'Ł')
	text = mw.ustring.gsub(text, 'Лӏ', 'Ḷ')
	text = mw.ustring.gsub(text, 'Пӏ', 'Ṗ')
	text = mw.ustring.gsub(text, 'Сӏ', 'Ṣ̣')
	text = mw.ustring.gsub(text, 'Тӏ', 'Ṭ')
	text = mw.ustring.gsub(text, 'Фӏ', 'F̣')
	text = mw.ustring.gsub(text, 'Ху', 'X°')
	text = mw.ustring.gsub(text, 'Хъ', 'Χ')
	text = mw.ustring.gsub(text, 'Хь', 'Ḥ')
	text = mw.ustring.gsub(text, 'Цу', 'C°')
	text = mw.ustring.gsub(text, 'Цӏ', 'C̣')
	text = mw.ustring.gsub(text, 'Чӏ', 'Č̣')
	text = mw.ustring.gsub(text, 'Чу', 'Č̍°')
	text = mw.ustring.gsub(text, 'Чъ', 'Č')
	text = mw.ustring.gsub(text, 'Шъ', 'Ŝ')
	text = mw.ustring.gsub(text, 'Шӏ', 'Ṣ̂')
	text = mw.ustring.gsub(text, '.', tt)
	
	return text
end

return export