This module will transliterate text in the Gothic script. It is used to transliterate Gothic.
The module should preferably not be called directly from templates or other modules.
To use it from a template, use {{xlit}}
.
Within a module, use Module:languages#Language:transliterate.
For testcases, see Module:Goth-translit/testcases.
tr(text, lang, sc)
text
written in the script specified by the code sc
, and language specified by the code lang
.nil
.local export = {}
local Goth_Latn = {
= "a",
= "b",
= "g",
= "d",
= "ē",
= "q",
= "z",
= "h",
= "þ",
= "i",
= "k",
= "l",
= "m",
= "n",
= "j",
= "u",
= "p",
= "?",
= "r",
= "s",
= "t",
= "w",
= "f",
= "x",
= "ƕ",
= "ō",
= "?",
}
local Latn_Goth = {
= "𐌰",
= "𐌴",
= "𐌹",
= "𐍉",
= "𐌿",
= "𐍅",
}
for g, l in pairs(Goth_Latn) do
if l ~= "?" then
Latn_Goth = g
end
end
function export.tr(text, lang, sc)
text = mw.ustring.gsub(text, "𐌴𐌹", "ei")
return (mw.ustring.gsub(text, '.', Goth_Latn))
end
function export.tr_reverse(text)
text = mw.ustring.lower(text)
return (mw.ustring.gsub(text, '.', Latn_Goth))
end
return export