ꯁꯤꯖꯤꯟꯅꯔꯤꯕ:Haoreima/Mtei to Latn

ꯋꯤꯀꯤꯄꯦꯗꯤꯌꯥ ꯗꯒꯤ

{{ local export = {} local gsub = mw.ustring.gsub local u = mw.ustring.char

local tt = { -- consonants ['ꯀ'] = 'ka', ['ꯈ'] = 'kha', ['ꯒ'] = 'ga', ['ꯘ'] = 'gha', ['ꯉ'] = 'nga', ['ꯆ'] = 'cha', ['ꫢ'] = 'chha', ['ꯖ'] = 'ja', ['ꯓ'] = 'jha', ['ꫣ'] = 'nya', ['ꫤ'] = 'tta', ['ꫥ'] = 'ttha', ['ꫦ'] = 'dda', ['ꫧ'] = 'ddha', ['ꫨ'] = 'nna', ['ꯇ'] = 'ta', ['ꯊ'] = 'tha', ['ꯗ'] = 'da', ['ꯙ'] = 'dha', ['ꯅ'] = 'na', ['ꯄ'] = 'pa', ['ꯐ'] = 'pha', ['ꯕ'] = 'ba', ['ꯚ'] = 'bha', ['ꯃ'] = 'ma', ['ꯌ'] = 'ya', ['ꯔ'] = 'ra', ['ꯂ'] = 'la', ['ꯋ'] = 'wa', ['ꫩ'] = 'sha', ['ꫪ'] = 'ssa', ['ꯁ'] = 'sa', ['ꯍ'] = 'ha', -- finals ['ꯛ'] = 'k', ['ꯜ'] = 'l', ['ꯝ'] = 'm', ['ꯞ'] = 'p', ['ꯟ'] = 'n', ['ꯠ'] = 't', ['ꯡ'] = 'ng', ['ꯢ'] = 'i', --ending -- independent vowels ['ꯑ'] = 'ʼa', ['ꯏ'] = 'ʼi', ['ꯎ'] = 'ʼu', ['ꫠ'] = 'ʼe', ['ꫡ'] = 'ʼo', -- dependent vowels and diacritics ['ꯥ'] = 'aa', ['ꯤ'] = 'ee', ['ꫫ'] = 'ī', ['ꯨ'] = 'u', ['ꫬ'] = 'ū', ['ꯦ'] = 'e', ['ꯩ'] = 'ei', ['ꫭ'] = 'ei', ['ꯣ'] = 'o', ['ꯧ'] = 'ou', ['ꫮ'] = 'au', ['ꫯ'] = 'āu', ['ꯪ'] = 'ng', ['ꫵ'] = 'ḥ', ['꫶'] = '¤', -- marks ['꯫'] = '.', ['꫰'] = ',', ['꫱'] = '?', ['ꫳ'] = '˶', ['ꫴ'] = '˶˶', ['꯭'] = '͟', -- numerals ["꯰"] = "0", ["꯱"] = "1", ["꯲"] = "2", ["꯳"] = "3", ["꯴"] = "4", ["꯵"] = "5", ["꯶"] = "6", ["꯷"] = "7", ["꯸"] = "8", ["꯹"] = "9", -- zero-width space (display it if it hides in a word) [u(0x200B)] = "‼", -- zero-width non-joiner and joiner (display it if it hides in a word) [u(0x200C)] = "₋", [u(0x200D)] = "₊", }

function export.tr(text, lang, sc)

if type(text) == 'table' then -- called directly from a template text = text.args[1] end

text = gsub(text, '.', tt)

text = gsub(text, 'ᵃ([aeiouāīū])', '%1') text = gsub(text, 'ᵃ¤', ) text = gsub(text, 'ᵃ͟', '͟') text = gsub(text, 'ᵃ', 'a') text = gsub(text, '¤', )

return text

end

return export }}