This module will transliterate Meroitic language text.
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:xmr-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 = {}
local chars = {
= "a", = "a",
= "e", = "e",
= "o", = "o",
= "i", = "i",
= "y", = "y",
= "w", = "w",
= "b", = "b",
= "p", = "p",
= "m", = "m",
= "n", = "n",
= "ne", = "ne",
= "r", = "r", = "r",
= "l", = "l",
= "ḫ", = "ḫ",
= "ẖ", = "ẖ",
= "se", = "se",
= "s", = "s",
= "k", = "k",
= "q", = "q",
= "t", = "t",
= "te", = "te",
= "to", = "to",
= "d", = "d",
}
function export.tr(text, lang, sc)
return (mw.ustring.gsub(text, '.', chars))
end
return export