မဝ်ဂျူ:Deva-Mong-translit
မံက်ပြာကတ်
Documentation for this module may be created at မဝ်ဂျူ:Deva-Mong-translit/doc
local export = {}
local tt = {
{"(.[ःा-ॄेैो-्ॢॣ]*)([ँं])", "%2%1"}, {"(.[ःा-ॄेैो-्ॢॣ]*)(ऽ+)", "%2%1"},
{"क", "ᢉᠠ"}, {"ख", "ᠻᠠ"}, {"ग", "ᠺᠠ"}, {"घ", "ᠺᠾᠠ"}, {"ङ", "ᢊᠠ"},
{"च", "ᢋᠠ"}, {"छ", "ᠼᠠ"}, {"ज", "ᠽᠠ"}, {"झ", "ᠽᠾᠠ"}, {"ञ", "ᡛᠠ"},
{"ट", "ᢌᠠ"}, {"ठ", "ᢍᠠ"}, {"ड", "ᢎᠠ"}, {"ढ", "ᢎᠾᠠ"}, {"ण", "ᢏᠠ"},
{"त", "ᢐᠠ"}, {"थ", "ᠲᠠ"}, {"द", "ᢑᠠ"}, {"ध", "ᢑᠾᠠ"}, {"न", "ᠨᠠ"},
{"प", "ᢒᠠ"}, {"फ", "ᠹᠠ"}, {"ब", "ᠪᠠ"}, {"भ", "ᠪᠾᠠ"}, {"म", "ᠮᠠ"},
{"य", "ᠶ᠋ᠠ"}, {"र", "ᠷᠠ"}, {"ल", "ᠯᠠ"}, {"व", "ᠸᠠ"},
{"श", "ᠱᠠ"}, {"ष", "ᢔᠠ"}, {"स", "ᠰᠠ"}, {"ह", "ᠾᠠ"},
{"अ", "ᠠ"}, {"आ", "ᠠᢗ"}, {"इ", "ᠢ"}, {"ई", "ᠢᠢ"}, {"उ", "ᠤ"}, {"ऊ", "ᠤᠤ"}, {"ऋ", "ᠷᠢ"}, {"ॠ", "ᠷᠢᠢ"},
{"ऌ", "ᠯᠢ"}, {"ॡ", "ᠯᠢᠢ"}, {"ए", "ᠧ"}, {"ऐ", "ᠧᠧ"}, {"ओ", "ᠣᠸᠠ"}, {"औ", "ᠣᠸᠸᠠ"},
{"ँ", "ᢀ"}, {"ं", "ᢀ᠋"}, {"ः", "ᢁ᠋"}, {"ऽऽऽ", "ᢆ"}, {"ऽ", "ᢅ"},
{"०", "᠐"}, {"१", "᠑"}, {"२", "᠒"}, {"३", "᠓"}, {"४", "᠔"}, {"५", "᠕"}, {"६", "᠖"}, {"७", "᠗"}, {"८", "᠘"}, {"९", "᠙"},
{"॥", "᠃ "}, {"।", "᠂ "},
{"ᳵ", "ᢂ"}, {"ᳶ", "ᢄ"},
{"ॐ", "ᢀᠣᠸᠠ"},
{"-", "᠊"},
{"(्)ᠸᠠ([^िीुूृॄेैोौ्ॢॣ])", "%1ᢦ%2"}, {"(्)ᠸᠠ$", "%1ᢦ"}, {"(्)ᠶ᠋ᠠ(ा?%s)", "%1ᠶᠠ%2"}, {"(्)ᠶ᠋ᠠ(ा?)$", "%1ᠶᠠ%2"},
{"ᠠा", "ᠠᢗ"}, {"ᠠि", "ᠢ"}, {"ᠠी", "ᠢᠢ"}, {"ᠠु", "ᠤ"}, {"ᠠू", "ᠤᠤ"}, {"ᠠृ", "ᠷᠢ"}, {"ᠠॄ", "ᠷᠢᠢ"},
{"ᠠॢ", "ᠯᠢ"}, {"ᠠॣ", "ᠯᠢᠢ"}, {"ᠠे", "ᠧ"}, {"ᠠै", "ᠧᠧ"}, {"ᠠो", "ᠣᠸᠠ"}, {"ᠠौ", "ᠣᠸᠸᠠ"}, {"ᠠ्", ""}, {"ᢦा", "ᢦᠠ"},
{"ᠯᠾ", "ᡀ"},
{"ᠠᢗ([^᠊ᠠ-ᡸᢇ-ᢪ])", "ᠠᠠ%1"}, {"ᠠᢗ$", "ᠠᠠ"}, {"^ᠠ([^᠊ᠠ-ᡸᢇ-ᢪ])", "ᠠ᠋%1"}, {"([^ᠪᠹᠺᠻᢉᢒ])ᠠ([^᠊ᠠ-ᡸᢇ-ᢪ])", "%1ᠠ᠋%2"}, {"^ᠠ$", "ᠠ᠋"}, {"([^ᠪᠹᠺᠻᢉᢒ])ᠠ$", "%1ᠠ᠋"}, {"(ᠣᠸᠸ?ᠠ)᠋", "%1"},
{"([ᢅᢆ])(.᠋?)", "%2%1"},
{"\n", " "}, {"<br>", " "},
{" ([᠃᠂])", "%1"},
{" +", " "}, {"^ +(.*)", "%1"}, {"(.*) +$", "%1"}
}
function export.tr(text)
text = mw.ustring.lower(text)
for _, replacement in ipairs(tt) do
text = mw.ustring.gsub(text, replacement[1], replacement[2])
end
return text
end
return export