Module:Sogd-translit

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

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}

local tt = {
	 = "ʾ", -- aleph
	 = "β", -- beth
	 = "ɣ", -- gimel
	 = "h", -- he
	 = "w", -- waw
	 = "z", -- zayin
	 = "x", -- heth
	 = "y", -- yodh
	 = "k", -- kaph
	 = "δ", -- lamedh
	 = "m", -- mem
	 = "n", -- nun
	 = "s", -- samekh
	 = "ʿ", -- ayin
	 = "p", -- pe
	 = "c", -- sadhe
	 = "r", -- resh-ayin
	 = "š", -- shin
	 = "t", -- taw
	 = "f", -- fesh
	 = "l", -- lesh
	 = "š", -- phonogram shin
	 = "", -- dot above
	 = "", -- dot above
	 = "", -- two dots above
	 = "", -- two dots below
	 = "", -- curve above
	 = "", -- curve below
	 = "", -- hook above
	 = "", -- hook below
	 = "", -- long hook below
	 = "", -- resh below
	 = "", -- stroke below
	 = "1", -- one
	 = "10", -- ten
	 = "20", -- twenty
	 = "100", -- one hundred
}

function export.tr(text, lang, sc)
	-- If the script is not Sogd, do not transliterate
	if sc ~= "Sogd" then
		return
	end
	
	-- Transliterate characters
	text = mw.ustring.gsub(text, '.', tt)
	
	return text
end

return export