This module will transliterate Ukrainian text per WT:UK TR through the function tr.


--[[
Transliteration for Ukrainian.
]]
local M={}
 
local tt={
    ["А"]='A', ["а"]='a', ["Б"]='B', ["б"]='b', ["В"]='V', ["в"]='v', ["Г"]='H', ["г"]='h', 
    ["Ґ"]='G', ["ґ"]='g', ["Д"]='D', ["д"]='d', ["Е"]='E', ["е"]='e', ["Є"]='Je', ["є"]='je', 
    ["Ж"]='Ž', ["ж"]='ž', ["З"]='Z', ["з"]='z', ["И"]='Y', ["и"]='y', ["І"]='I', ["і"]='i', 
    ["Ї"]='Ji', ["ї"]='ji', ["Й"]='J', ["й"]='j', ["К"]='K', ["к"]='k', ["Л"]='L', ["л"]='l', 
    ["М"]='M', ["м"]='m', ["Н"]='N', ["н"]='n', ["О"]='O', ["о"]='o', ["П"]='P', ["п"]='p', 
    ["Р"]='R', ["р"]='r', ["С"]='S', ["с"]='s', ["Т"]='T', ["т"]='t', ["У"]='U', ["у"]='u', 
    ["Ф"]='F', ["ф"]='f', ["Х"]='X', ["х"]='x', ["Ц"]='C', ["ц"]='c', ["Ч"]='Č', ["ч"]='č', 
    ["Ш"]='Š', ["ш"]='š', ["Щ"]='Šč', ["щ"]='šč', ["Ь"]='ʹ', ["ь"]='ʹ', ["Ю"]='Ju', ["ю"]='ju', 
    ["Я"]='Ja', ["я"]='ja', ["'"]='ʺ', ["’"]='ʺ', ["ʼ"]= 'ʺ', 
    -- obsolete letters
    ["Ё"]='Ë', ["ё"]='ë', ["Ъ"]='ʺ', ["ъ"]='ʺ', ["Ы"]='Y', ["ы"]='y', ["Ѣ"]='Ě', ["ѣ"]='ě', 
    ["Э"]='È', ["э"]='è',
    --digraph
    ["ьо"] = "jo",
};
function M.tr(text)--translit any words or phrases
    if type(text) == "table" then text = text.args[1] end
 
    return (mw.ustring.gsub(text, '.', tt))
end
return M