Module:Armi-translit

Hello, you have come here looking for the meaning of the word Module:Armi-translit. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:Armi-translit, but we will also tell you about its etymology, its characteristics and you will know how to say Module:Armi-translit in singular and plural. Everything you need to know about the word Module:Armi-translit you have here. The definition of the word Module:Armi-translit will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:Armi-translit, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module will transliterate text in the Imperial Aramaic script. It is used to transliterate Aramaic. 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:Armi-translit/testcases.

Functions

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 = {
	 = "ʾ", -- aleph
	 = "b", -- beth
	 = "g", -- gimel
	 = "d", -- daleth
	 = "h", -- he
	 = "w", -- waw
	 = "z", -- zayin
	 = "ḥ", -- heth
	 = "ṭ", -- teth
	 = "y", -- yodh
	 = "k", -- khaph
	 = "l", -- lamedh
	 = "m", -- mem
	 = "n", -- nun
	 = "s", -- samekh
	 = "ʿ", -- ayin
	 = "p", -- pe
	 = "ṣ", -- sadhe
	 = "q", -- qoph
	 = "r", -- resh
	 = "š", -- shin
	 = "t", -- taw
	 = "|", -- section sign
	 = "1", -- one
	 = "2", -- two
	 = "3", -- three
	 = "10", -- ten
	 = "20", -- twenty
	 = "100", -- one hundred
	 = "1000", -- one thousand
	 = "10000", -- ten thousand
}

function export.tr(text, lang, sc)
	
	if sc ~= "Armi" then
		return
	end

	-- Transliterate characters
	text = mw.ustring.gsub(text, '.', tt)
	
	return text
end

return export