logo

Module:Aghb-translit是什么意思_Module:Aghb-translit读音|解释_Module:Aghb-translit同义词|反义词

Module:Aghb-translit

这个模组会将高加索阿尔巴尼亚文文字转写为拉丁字母。

最好不要直接从模板或其他模组调用此模组。要从模板中使用它,请以{{xlit}}做为替代;若要在模组中使用,则以Module:languages#Language:transliterate替代。

关于测试用例,请参阅Module:Aghb-translit/testcases。

函数

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", ["𐔴"]="e", ["𐔵"]="z", ["𐔶"]="ē", ["𐔷"]="ž", ["𐔸"]="t", ["𐔹"]="ć̣", ["𐔺"]="y", ["𐔻"]="ź", ["𐔼"]="i",
	["𐔽"]="ʕ", ["𐔾"]="l", ["𐔿"]="n'", ["𐕀"]="x", ["𐕁"]="d'", ["𐕂"]="c̣", ["𐕃"]="ʒ́", ["𐕄"]="ḳ", ["𐕅"]="l'", ["𐕆"]="h", ["𐕇"]="x̣", ["𐕈"]="å", ["𐕉"]="ć",
	["𐕊"]="č̣", ["𐕋"]="c'", ["𐕌"]="m", ["𐕍"]="q̇", ["𐕎"]="n", ["𐕏"]="ʒˈ", ["𐕐"]="š", ["𐕑"]="ǯ", ["𐕒"]="o", ["𐕓"]="ṭ'", ["𐕔"]="f", ["𐕕"]="ʒ", ["𐕖"]="č",
	["𐕗"]="ṗ", ["𐕘"]="ġ", ["𐕙"]="r", ["𐕚"]="s", ["𐕛"]="v", ["𐕜"]="ṭ", ["𐕝"]="ś", ["𐕞"]="ü", ["𐕟"]="c̣'", ["𐕠"]="c",
	["𐕡"]="w", ["𐕢"]="p", ["𐕣"]="k", ["𐕯"]="»"
};

function export.tr(text)
	text = mw.ustring.gsub(text, '𐕒𐕡', 'u')
	text = mw.ustring.gsub(text, '.', tt)
	
	return text
end

return export