Modul:uga-translit

Vun Wiktionary

This module generates transliterations for Ugaritic (code: uga)


--[[
Transliteration for Ugaritic
]]--
 
local export = {}
 
local tt = {
    ["𐎀"] = "ʾa", ["𐎁"] = "b",  ["𐎂"] = "g",  ["𐎃"] = "ẖ",  ["𐎄"] = "d",
    ["𐎅"] = "h",  ["𐎆"] = "w",  ["𐎇"] = "z",  ["𐎈"] = "ḥ",  ["𐎉"] = "ṭ",
    ["𐎊"] = "y",  ["𐎋"] = "k",  ["𐎌"] = "š",  ["𐎍"] = "l",  ["𐎎"] = "m",
    ["𐎏"] = "ḏ",  ["𐎐"] = "n",  ["𐎑"] = "ẓ",  ["𐎒"] = "s",  ["𐎓"] = "ʿ",
    ["𐎔"] = "p",  ["𐎕"] = "ṣ",  ["𐎖"] = "q",  ["𐎗"] = "r",  ["𐎘"] = "ṯ",
    ["𐎙"] = "ġ",  ["𐎚"] = "t",  ["𐎛"] = "ʾi", ["𐎜"] = "ʾu", ["𐎝"] = "s₂",
    ["𐎟"] = " " -- word divider
    }
 
function export.tr(text)
    if type(text) == 'table' then
        text = text.args[1]
    end
 
    text = mw.ustring.gsub(text, ".", tt)
 
    return text
end
 
return export