Module:inc-mbn-translit/sandbox
Appearance
- This module sandbox lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox of (diff)
local export = {}
local gsub = mw.ustring.gsub
local match = mw.ustring.match
local char = {
["ৰ"] = "r", ["ৱ"] = "w"
}
function export.tr(text, lang, sc, override)
local UTF8_char = "[%z\1-\127\194-\244][\128-\191]*"
local Beng = require("Module:scripts").getByCode("Beng")
text = mw.ustring.toNFD(text)
text = string.gsub(text, UTF8_char, char)
text = require("Module:bn-translit").tr(text, lang, sc, true)
text = gsub(text, ".[়’]?", char)
text = gsub(text, ".", char)
end
return export