This module will transliterate text in the Phoenician script. It is used to transliterate Moabite, Phoenician, Ammonite, Edomite, and Punic.
The module should preferably not be called directly from templates or other modules.
To use it from a template, use {{xlit}}
.
Within a module, use Module:languages#Language:transliterate.
For testcases, see Module:Phnx-translit/testcases.
tr(text, lang, sc)
text
written in the script specified by the code sc
, and language specified by the code lang
.nil
.local export = {}
-- 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)
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