local export = {}
local gsub = mw.ustring.gsub
local u = mw.ustring.char
-- Beware! Phnx is rtl
local tt = {
= 'ʾ', = 'b', = 'g', = 'd', = 'h',
= 'w', = 'z', = 'ḥ', = 'ṭ', = 'y',
= 'k', = 'l', = 'm', = 'n', = 's',
= 'ʿ', = 'p', = 'ṣ', = 'q', = 'r',
= 'š', = 't',
= '', = '', = '', = '',
= '', = '', = ' ',
}
function export.tr(text, lang, sc, debug_mode)
if type(text) == 'table' then -- called directly from a template
text = text.args
end
return (text:gsub('*', tt)) -- UTF-8 character pattern
end
return export