local export = {}
local tt = {}
-- from Teulgi to Tuġvut font
tt["Latn"] = {
["-t"] = '_0', ["-"] = '_',
-- Synthetic diphthongs
["uo"]='aa-', ["ay"]='aa--',
-- Short vowels
["o"]='u-', ["e"]='i-',
["y"]='a-', ["ů"]='u--',
-- Geminate vowels
["ả"]='aa', ["ủ"]='uu',
["ỏ"]='u-u-', ["ỉ"]='ii',
["ẻ"]='i-i-', ["ỷ"]='a-a-',
-- m-series
["bm"]='pm', ["ṃṃ"]='m-m', ["ṃ"]='m-',
-- n-series
["ng"]='N-', ["dn"]='t-n', ["tṇ"]='t-n-',
["nnį"]='n--', ["ṇṇį"]='N',
["nį"]='n--', ["ṇį"]='N',
["ṇṇ"]='n-n',
-- v-series
["v"]='f', -- synthetic <p> has to be manual
-- p-series
["bb"]='p-p', ["b"]='p-',
-- t-series
["ḍḍ"]='t--t', ["dd"]='t-t',
["ḍ"]='t--', ["d"]='t-',
-- ġ-series
["ḥḥ"]='h--h', ["ġġ"]='g-g',
["ḥ"]='h--', ["ġ"]='g-',
["ġf"]='hf',
["tġv"]='hf--', ["tġ"]='hf-',
-- h-series
["hhį"]='h-h', ["hį"]='h-',
-- s-series
["ttṡ"]='c--c', ["tts"]='c-c',
["tṡ"]='c--', ["ts"]='c-',
["ṡ"]='c',
-- r-series
["ṛṛ"]='r-r', ["ṛ"]='r-',
-- l-series
["ḷḷį"]='L--L', ["llį"]='L-L',
["ḷį"]='L--', ["lį"]='L-',
["ḷ"]='L', ["ƛ"]='T',
-- į-series
["į"]='j',
};
function export.tr(text, lang, sc)
sc = sc or "Latn"
return mw.ustring.gsub(mw.ustring.lower(text), '.', tt[sc])
end
return export