Zum Inhalt springen

Modul:Goth-translit

Vun Wiktionary

This module is used to transliterate text in the Gothic alphabet.


local export = {}
 
local replacements = {
    ["𐌰"]="a",
    ["𐌱"]="b",
    ["𐌲"]="g",
    ["𐌳"]="d",
    ["𐌴"]="ē",
    ["𐌵"]="q",
    ["𐌶"]="z",
    ["𐌷"]="h",
    ["𐌸"]="þ",
    ["𐌹"]="i",
    ["𐌺"]="k",
    ["𐌻"]="l",
    ["𐌼"]="m",
    ["𐌽"]="n",
    ["𐌾"]="j",
    ["𐌿"]="u",
    ["𐍀"]="p",
    ["𐍁"]="?",
    ["𐍂"]="r",
    ["𐍃"]="s",
    ["𐍄"]="t",
    ["𐍅"]="w",
    ["𐍆"]="f",
    ["𐍇"]="x",
    ["𐍈"]="ƕ",
    ["𐍉"]="ō",
    ["𐍊"]="?",
}
 
function export.tr(text, lang, sc)
    if type(text) == "table" then
        local frame = text
        text = frame.args[1]
    end
 
    text = mw.ustring.gsub(text, "𐌴𐌹", "ei")
 
    return (mw.ustring.gsub(text, '.', replacements))
end
 
return export