Modul:lez-translit
Utsehn
This module will transliterate Lezgi text per WT:LEZ TR through the function tr.
--[[
Transliteration for the Lezgi language.
]]
local M={}
local tt={
["б"]="b", ["п"]="p", ["ф"]="f", ["в"]="v", ["м"]="m",
["д"]="d", ["т"]="t", ["й"]="j", ["н"]="n", ["з"]="z", ["ц"]="c",
["с"]="s", ["ж"]="ž", ["ш"]="š", ["щ"]="šč",
["л"]="l", ["ч"]="č", ["р"]="r", ["г"]="g", ["к"]="k", ["х"]="χ",
["ъ"]="ʾ", ["а"]="a", ["е"]="e", ["ы"]="y", ["и"]="i", ["о"]="o", ["у"]="u",
["ё"]="ë", ["ь"]="’", ["э"]="è", ["ю"]="ju", ["я"]="ä",
["Б"]="B", ["П"]="P", ["Ф"]="F", ["В"]="V", ["М"]="M",
["Д"]="D", ["Т"]="T", ["Й"]="J", ["Н"]="N", ["З"]="Z", ["Ц"]="C",
["С"]="S", ["Ж"]="Ž", ["Ш"]="Š", ["Щ"]="Šč",
["Л"]="L", ["Ч"]="Č", ["Р"]="R", ["Г"]="G", ["К"]="K", ["Х"]="Χ",
["Ъ"]="ʾ", ["А"]="A", ["Е"]="E", ["Ы"]="Y", ["И"]="I", ["О"]="O", ["У"]="U",
["Ё"]="Ë", ["Ь"]="’", ["Э"]="È", ["Ю"]="Ju", ["Я"]="Ä"};
function M.tr(f)--translit any words or phrases
if type(f) == 'table' then f = f.args[1] end
f = mw.ustring.gsub(f, 'хъв', 'q°')
f = mw.ustring.gsub(f, 'Хъв', 'Q°')
f = mw.ustring.gsub(f, 'къв', 'q̄°')
f = mw.ustring.gsub(f, 'Къв', 'Q̄°')
f = mw.ustring.gsub(f, 'кьв', 'q̇°')
f = mw.ustring.gsub(f, 'Кьв', 'Q̇°')
f = mw.ustring.gsub(f, 'гъв', 'ġ°')
f = mw.ustring.gsub(f, 'Гъв', 'Ġ°')
f = mw.ustring.gsub(f, 'ттв', 't̄°')
f = mw.ustring.gsub(f, 'Ттв', 't̄°')
f = mw.ustring.gsub(f, 'ццв', 'c̄°')
f = mw.ustring.gsub(f, 'Ццв', 'C̄°')
f = mw.ustring.gsub(f, 'ккв', 'k̄°')
f = mw.ustring.gsub(f, 'Ккв', 'K̄°')
f = mw.ustring.gsub(f, 'тӏв', 'ṭ°')
f = mw.ustring.gsub(f, 'Тӏв', 'Ṭ°')
f = mw.ustring.gsub(f, 'цӏв', 'c̣°')
f = mw.ustring.gsub(f, 'Цӏв', 'C̣°')
f = mw.ustring.gsub(f, 'кӏв', 'ḳ°')
f = mw.ustring.gsub(f, 'Кӏв', 'Ḳ°')
f = mw.ustring.gsub(f, 'тв', 't°')
f = mw.ustring.gsub(f, 'Тв', 'T°')
f = mw.ustring.gsub(f, 'зв', 'z°')
f = mw.ustring.gsub(f, 'Зв', 'Z°')
f = mw.ustring.gsub(f, 'хв', 'χ°')
f = mw.ustring.gsub(f, 'Хв', 'Χ°')
f = mw.ustring.gsub(f, 'цв', 'c°')
f = mw.ustring.gsub(f, 'Цв', 'C°')
f = mw.ustring.gsub(f, 'св', 's°')
f = mw.ustring.gsub(f, 'Св', 'S°')
f = mw.ustring.gsub(f, 'пп', 'p̄')
f = mw.ustring.gsub(f, 'пӏ', 'ṗ')
f = mw.ustring.gsub(f, 'тт', 't̄')
f = mw.ustring.gsub(f, 'Пп', 'P̄')
f = mw.ustring.gsub(f, 'Пӏ', 'Ṗ')
f = mw.ustring.gsub(f, 'Тт', 'T̄')
f = mw.ustring.gsub(f, 'цӏ', 'c̣')
f = mw.ustring.gsub(f, 'цц', 'c̄')
f = mw.ustring.gsub(f, 'тӏ', 'ṭ')
f = mw.ustring.gsub(f, 'чч', 'č̄')
f = mw.ustring.gsub(f, 'чӏ', 'č̣')
f = mw.ustring.gsub(f, 'кь', 'q̇')
f = mw.ustring.gsub(f, 'кк', 'k̄')
f = mw.ustring.gsub(f, 'кӏ', 'ḳ')
f = mw.ustring.gsub(f, 'хъ', 'q')
f = mw.ustring.gsub(f, 'къ', 'q̄')
f = mw.ustring.gsub(f, 'гъ', 'ġ')
f = mw.ustring.gsub(f, 'гь', 'h')
f = mw.ustring.gsub(f, 'Цӏ', 'C̣')
f = mw.ustring.gsub(f, 'Цц', 'C̄')
f = mw.ustring.gsub(f, 'Тӏ', 'Ṭ')
f = mw.ustring.gsub(f, 'Чч', 'Č̄')
f = mw.ustring.gsub(f, 'Чӏ', 'Č̣')
f = mw.ustring.gsub(f, 'Кь', 'Q̇')
f = mw.ustring.gsub(f, 'Кк', 'K̄')
f = mw.ustring.gsub(f, 'Кӏ', 'Ḳ')
f = mw.ustring.gsub(f, 'Хъ', 'Q')
f = mw.ustring.gsub(f, 'Къ', 'Q̄')
f = mw.ustring.gsub(f, 'Гъ', 'Ġ')
f = mw.ustring.gsub(f, 'Гь', 'H')
f = mw.ustring.gsub(f, 'уь', 'ü')
f = mw.ustring.gsub(f, 'Уь', 'Ü')
f = mw.ustring.gsub(f, 'хь', 'x')
f = mw.ustring.gsub(f, 'Хь', 'X')
f = mw.ustring.gsub(f, 'гв', 'g°')
f = mw.ustring.gsub(f, 'Гв', 'G°')
f = mw.ustring.gsub(f, 'кв', 'k°')
f = mw.ustring.gsub(f, 'Кв', 'K°')
f = mw.ustring.gsub(f, '.', tt)
return f
end
return M