This module will transliterate Abaza text per WT:ABQ TR through the function tr.


--[[
Transliteration for the Adyghe language.
]]
local M={}
 
local tt={
 
["а"]="ā", ["б"]="b", ["в"]="v", ["г"]="g", ["д"]="d", ["е"]="e", ["ё"]="ë", ["ж"]="ž", ["з"]="z", 
["и"]="i", ["й"]="j", ["к"]="k", ["л"]="l", ["м"]="m", ["н"]="n", ["о"]="o", 
["п"]="p", ["р"]="r", ["с"]="s", ["т"]="t",  ["у"]="w", ["ф"]="f", ["х"]="x", ["ц"]="c",  ["ч"]="č̍", 
["ш"]="š", ["щ"]="š̍", ["ъ"]="ʾ", ["ы"]="ə", ["ь"]="’", ["э"]="è", 
["ю"]="ju", ["я"]="ja", ["А"]="Ā", ["Б"]="B", ["В"]="V", ["Г"]="G", ["Д"]="D", ["Е"]="E", ["Ё"]="Ë", ["Ж"]="Ž", ["З"]="Z", 
["И"]="I", ["Й"]="J", ["К"]="K", ["Л"]="L", ["М"]="M", ["Н"]="N", ["О"]="O", 
["П"]="P", ["Р"]="R", ["С"]="S", ["Т"]="T",  ["У"]="W", ["Ф"]="F", ["Х"]="X", ["Ц"]="C",  ["Ч"]="Č̍", 
["Ш"]="Š", ["Щ"]="Š̍", ["Ъ"]="ʾ", ["Ы"]="Ə", ["Ь"]="’", ["Э"]="È", 
["Ю"]="Ju", ["Я"]="Ja"};
 
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, 'Гӏв', 'ʿ°')
     f = mw.ustring.gsub(f, 'Гъв', 'Γ°')
     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, 'Къь', 'Q̇̍')
     f = mw.ustring.gsub(f, 'Кӏв', 'Ḳ°')
     f = mw.ustring.gsub(f, 'Кӏь', 'Ḳ̍')
     f = mw.ustring.gsub(f, 'Хӏв', 'H°')
     f = mw.ustring.gsub(f, 'Чӏв', 'Č̣°')
     f = mw.ustring.gsub(f, 'хъв', 'q°')
     f = mw.ustring.gsub(f, 'гӏв', 'ʿ°')
     f = mw.ustring.gsub(f, 'гъв', 'γ°')
     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, 'къь', 'q̇̍')
     f = mw.ustring.gsub(f, 'кӏв', 'ḳ°')
     f = mw.ustring.gsub(f, 'кӏь', 'ḳ̍')
     f = mw.ustring.gsub(f, 'хӏв', 'h°')
     f = mw.ustring.gsub(f, 'чӏв', 'č̣°')  
     f = mw.ustring.gsub(f, 'гв', 'g°')
     f = mw.ustring.gsub(f, 'гъ', 'γ')
     f = mw.ustring.gsub(f, 'гь', 'g̍')
     f = mw.ustring.gsub(f, 'гӏ', 'ʿ')
     f = mw.ustring.gsub(f, 'дж', 'ǯ')
     f = mw.ustring.gsub(f, 'дз', 'ʒ')
     f = mw.ustring.gsub(f, 'жв', 'ž°')
     f = mw.ustring.gsub(f, 'жь', 'ž̍')
     f = mw.ustring.gsub(f, 'кв', 'k°')
     f = mw.ustring.gsub(f, 'къ', 'q̇')
     f = mw.ustring.gsub(f, 'кь', 'k̍')
     f = mw.ustring.gsub(f, 'кӏ', 'ḳ')
     f = mw.ustring.gsub(f, 'тл', 'ł')
     f = mw.ustring.gsub(f, 'тш', 'č')
     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, 'хӏ', 'ḥ')
     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, 'шв', 'š°')
     f = mw.ustring.gsub(f, 'ль', 'l')
     f = mw.ustring.gsub(f, 'лӏ', 'ḷ')
     f = mw.ustring.gsub(f, 'хъ', 'q')
     f = mw.ustring.gsub(f, 'фӏ', 'f̣')
     f = mw.ustring.gsub(f, 'Гв', 'G°')
     f = mw.ustring.gsub(f, 'Гъ', 'Γ')
     f = mw.ustring.gsub(f, 'Гь', 'G̍')
     f = mw.ustring.gsub(f, 'Гӏ', 'ʿ')
     f = mw.ustring.gsub(f, 'Дж', 'Ǯ')
     f = mw.ustring.gsub(f, 'Дз', 'Ʒ')
     f = mw.ustring.gsub(f, 'Жв', 'Ž°')
     f = mw.ustring.gsub(f, 'Жь', 'Ž̍')
     f = mw.ustring.gsub(f, 'Кв', 'K°')
     f = mw.ustring.gsub(f, 'Къ', 'Q̇')
     f = mw.ustring.gsub(f, 'Кь', 'K̍')
     f = mw.ustring.gsub(f, 'Кӏ', 'Ḳ')
     f = mw.ustring.gsub(f, 'Тл', 'Ł')
     f = mw.ustring.gsub(f, 'Тш', 'Č')
     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, 'Хӏ', 'Ḥ')
     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, 'Шв', 'Š°')
     f = mw.ustring.gsub(f, 'Ль', 'L')
     f = mw.ustring.gsub(f, 'Лӏ', 'Ḷ')
     f = mw.ustring.gsub(f, 'Хъ', 'Q')
     f = mw.ustring.gsub(f, 'Фӏ', 'F̣')
     f = mw.ustring.gsub(f, '.', tt)
    return f
end
return M