This module will transliterate text in the Runic script in Proto-Norse (gmq-pro
), Old English (ang
) and Old Norse (non
). It is used to transliterate Old English, Proto-Norse, Old High German, and Old Norse.
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:Runr-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 letters = {}
local export = {}
local letters = {}
-- Elder futhark
letters = {
='f',
='u',
='þ',
='a',
='r',
='k', ='k', ='k',--transitional period
='g',
='w',
='h', ='h',
='n',
='i',
='j', ='ᴀ',--transitional period
='ï',
='p',
='ʀ', ='ʀ',--transitional period
='s', ='s',
='t',
='b',
='e',
='m',
='l',
='ŋ', ="ŋ",
='o',
='d',
='·', =':'
}
-- Old High German
letters = {
='f',
='u',
='þ',
='a',
='r',
='k', ='k', ='k',
='g',
='w',
='h', ='h',
='n',
='i',
='j',
='ï',
='p',
='s', ='s',
='t',
='b',
='e',
='m',
='l',
='ŋ', ="ŋ",
='o',
='d'
}
-- Anglo-Saxon futhorc
letters = {
="f",
="u",
="þ",
="ó",
="r",
="c",
="ġ",="g",
="w",
='h', ='h',
="n",
="i",
="j",
="eo",
="p",
="x",
="s",
="t",
="b",
="e",
="m",
="l",
='ŋ', ="ŋ",
="œ",
="d",
="a",
="æ",
="y",
="io",
="ea"
}
-- Younger futhark, including later stung or otherwise modified variants
letters = {
="f", ="v",
="u", ="y",
="þ", ="ð",
="ą", ="ą", ="ą", ="o", ="ø", ="ǫ",
="r",
="k", ="g",
="h", ="h",
="n", ="n",
="i", ="e",
="a", ="a", ='ᴀ',
="s", ="s",
="t", ="t", ="d",
="b", ="b", ="p", ="p",
="m", ="m",
="l",
="ʀ", ="ʀ",
--certain Elder Futhark letters exist in early Old Norse inscriptions
='ɢ',
='w',
='ʜ',
='ᴇ',
='ᴍ',
='ᴅ',
='ᴏ'
}
-- Old Danish
letters = {
="f", ="v",
="u", ="y",
="þ", ="ð",
="o", ="ø",
="r",
="k", ="g",
="h", ="h",
="n", ="n",
="i", ="e",
="æ", ="a",
="s", ="s",
="t", ="t", ="d",
="b", ="b", ="p", ="p",
="m", ="m",
="l",
="y", ="ʀ",
}
function export.tr(text, lang, sc)
if letters then
return (mw.ustring.gsub(text, ".", letters))
end
return nil
end
return export