local export = {}
local tab = {
="A", ="B", ="V", ="G", ="D", ="E", ="Jo", ="Ž", ="Z", ="I", ="Ï", ="J",
="K", ="L", ="M", ="N", ="O", ="Ö", ="P", ="R", ="S", ="T", ="U", ="F",
="X", ="C", ="Č", ="Š", ="Šč", ="ʺ", ="Y", ="ʹ", ="E", ="Ju", ="Ja",
='a', ='b', ='v', ='g', ='d', ='e', ='jo', ='ž', ='z', ='i', ='ï', ='j',
='k', ='l', ='m', ='n', ='o', ='ö', ='p', ='r', ='s', ='t', ='u', ='f',
='x', ='c', ='č', ='š', ='šč', ='ʺ', ='y', ='ʹ', ='e', ='ju', ='ja',
-- Komi-Yazva letters
='Å', ='å', ='Ü', ='ü'
}
function export.tr(text, lang, sc)
-- Ё needs converting if is decomposed
text = text:gsub("ё","ё"):gsub("Ё","Ё")
-- е after a vowel or at the beginning of a word becomes je
text = mw.ustring.gsub(text, "(?)е","%1je")
text = mw.ustring.gsub(text, "^Е","Je")
text = mw.ustring.gsub(text, "^е","je")
text = mw.ustring.gsub(text, "()Е","%1Je")
text = mw.ustring.gsub(text, "()е","%1je")
return (mw.ustring.gsub(text,'.',tab))
end
return export