Module:Rohg-translit
Documentation for this module may be created at Module:Rohg-translit/doc
local export = {}
local u = require("Module:string/char")
local tt = {
-- consonants
["π΄"]="", ["π΄"]="b", ["π΄"]="t", ["π΄"]="th",
["π΄
"]="j", ["π΄"]="ch", ["π΄"]="h", ["π΄"]="kh",
["π΄"]="f", ["π΄"]="p", ["π΄"]="d", ["π΄"]="dh",
["π΄"]="r", ["π΄"]="Γ§", ["π΄"]="z", ["π΄"]="s",
["π΄"]="c", ["π΄"]="k", ["π΄"]="g", ["π΄"]="l",
["π΄"]="m", ["π΄"]="n", ["π΄"]="w", ["π΄"]="u",
["π΄"]="y", ["π΄"]="i", ["π΄"]="ng", ["π΄"]="ny", ["π΄"]="v",
-- vowels
["π΄"]="a", ["π΄"]="i", ["π΄"]="u", ["π΄ "]="e", ["π΄‘"]="o",
-- others
["π΄’"]="", --only used after some ending consonants
["π΄£"]="Γ±", --nasalization
[u(0x200D)]="", --ZWJ, might appear to adjust consonants
-- numerals
["π΄°"]="0", ["π΄±"]="1", ["π΄²"]="2", ["π΄³"]="3", ["π΄΄"]="4",
["π΄΅"]="5", ["π΄Ά"]="6", ["π΄·"]="7", ["π΄Έ"]="8", ["π΄Ή"]="9",
}
function export.tr(text, lang, sc)
text = mw.ustring.gsub(text, ".", tt)
-- tones and special mark
text = mw.ustring.gsub(text, "(.)π΄€", "%1Μ")
text = mw.ustring.gsub(text, "(.)π΄₯", "%1Μ%1")
text = mw.ustring.gsub(text, "(.)π΄¦", "%1%1Μ")
text = mw.ustring.gsub(text, "(.)π΄§", "%1%1")
return text
end
return export