Modul:uga-translit

Modul ini akan mentransliterasi Bahasa Ugaritic teks. 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:uga-translit/testcases.

Functions

sunting
tr(text, lang, sc)
Transliterates a given piece of text written in the script specified by the code sc, and language specified by the code lang.
When the transliteration fails, returns nil.

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, lang, sc)
	text = mw.ustring.gsub(text, ".", tt)
	return text
end

return export