Module:zkt-translit

local export = {}

local data = mw.loadData("Module:zkt-translit/data")

function export.tr(text, lang, sc) -- Remove text formatting. text = text:gsub("\244[\128-\191][\128-\191][\128-\191]", "") local trtab = {} i = 0 for char in mw.ustring.gmatch(text, ".") do		i = i + 1 if char == "𘬀" and i > 1 then table.insert(trtab, trtab[i-1]) else table.insert(trtab, data[char] or "?") end end local check = table.concat(trtab) _, count = mw.ustring.gsub(check, "?", "") if count == mw.ustring.len(check) then return nil else return "*" .. table.concat(trtab, " ") end end

return export