Modül:uk-alfabeçeviri

Modül belgelemesi [Düzenle] [Tazele]


local export = {}
 
local tt = {
	["А"]='A', ["а"]='a', ["Б"]='B', ["б"]='b', ["В"]='V', ["в"]='v', ["Г"]='Ğ', ["г"]='ğ', 
	["Ґ"]='G', ["ґ"]='g', ["Д"]='D', ["д"]='d', ["Е"]='E', ["е"]='e', ["Є"]='Ye', ["є"]='ye', 
	["Ж"]='J', ["ж"]='j', ["З"]='Z', ["з"]='z', ["И"]='I', ["и"]='ı', ["І"]='İ', ["і"]='i', 
	["Ї"]='Yi', ["ї"]='yi', ["Й"]='Y', ["й"]='y', ["К"]='K', ["к"]='k', ["Л"]='L', ["л"]='l', 
	["М"]='M', ["м"]='m', ["Н"]='N', ["н"]='n', ["О"]='O', ["о"]='o', ["П"]='P', ["п"]='p', 
	["Р"]='R', ["р"]='r', ["С"]='S', ["с"]='s', ["Т"]='T', ["т"]='t', ["У"]='U', ["у"]='u', 
	["Ф"]='F', ["ф"]='f', ["Х"]='H', ["х"]='h', ["Ц"]='Ts', ["ц"]='ts', ["Ч"]='Ç', ["ч"]='ç', 
	["Ш"]='Ş', ["ш"]='ş', ["Щ"]='Şç', ["щ"]='şç', ["Ь"]='ʹ', ["ь"]='ʹ', ["Ю"]='Yu', ["ю"]='yu', 
	["Я"]='Ya', ["я"]='ya', 
	-- right single quotation mark, modifier letter apostrophe → modifier letter double prime
	["’"]='ʺ', ["ʼ"]= 'ʺ', 
	-- obsolete letters
	["Ё"]='Ë', ["ё"]='ë', ["Ъ"]='ʺ', ["ъ"]='ʺ', ["Ы"]='Y', ["ы"]='y', ["Ѣ"]='Ě', ["ѣ"]='ě', 
	["Э"]='È', ["э"]='è',
}

function export.tr(text)--translit any words or phrases
	text = mw.ustring.gsub(text, "'+", { ["'"] = 'ʺ' }) -- neutral apostrophe
	text = mw.ustring.gsub(text, '.', tt)

	return text
end

return export