Module:taln-conj: Difference between revisions

Nehster9 (talk | contribs)
mNo edit summary
Nehster9 (talk | contribs)
mNo edit summary
Line 78: Line 78:
local function romanize(text)
local function romanize(text)


     local result = ""
     local result = text


     for _, cp in utf8.codes(text) do
     for bichig, latin in pairs(translit) do
        local ch = utf8.char(cp)
         result = mw.ustring.gsub(result, bichig, latin)
         result = result .. (translit[ch] or ch)
     end
     end