Module talk:kjh-translit

local export = {}

data["kjh-kyz"] = { ["А"]='A', ["а"]='a', ["Б"]='B', ["б"]='b', ["В"]='Bʻ', ["в"]='bʻ', ["Г"]='G', ["г"]='g', ["Ғ"]='Ɣ', ["ғ"]='ɣ', ["Д"]='D', ["д"]='d', ["Е"]='E', ["е"]='e', ["Ё"]='Yo', ["ё"]='yo', ["Ж"]='Ǯ', ["ж"]='ǯ', ["З"]='Z', ["з"]='z', ["И"]='I', ["и"]='i', ["Й"]='Y', ["й"]='y', ["І"]='Ĭ', ["і"]='ĭ', ["К"]='K', ["к"]='k', ["Л"]='L', ["л"]='l', ["М"]='M', ["м"]='m', ["Н"]='N', ["н"]='n', ["Ң"]='Ŋ', ["ң"]='ŋ', ["О"]='O', ["о"]='o', ["Ö"]='Ö', ["ö"]='ö', ["П"]='P', ["п"]='p', ["Р"]='R', ["р"]='r', ["С"]='S', ["с"]='s', ["Т"]='T', ["т"]='t', ["У"]='U', ["у"]='u', ["Ӱ"]='Ü', ["ӱ"]='ü', ["Ф"]='Pʻ', ["ф"]='pʻ', ["Х"]='Χ', ["х"]='χ', ["Ц"]='C', ["ц"]='c', ["Ч"]='Č', ["ч"]='č', ["Ӌ"]='J', ["ӌ"]='j', ["Ш"]='Š', ["ш"]='š', ["Щ"]='ŠČ', ["щ"]='šč', ['Ъ']='ʺ', ['ъ']='ʺ', ["Ы"]='Ɨ', ["ы"]='ɨ', ["Ь"]="’", ["ь"]="’", ["Э"]='E', ["э"]='e', ["Ю"]='Yu', ["ю"]='yu', ["Я"]='Ya', ["я"]='ya', }

data["kjh-fyk"] = { ["А"]='A', ["а"]='a', ["Б"]='B', ["б"]='b', ["В"]='Bʻ', ["в"]='bʻ', ["Г"]='G', ["г"]='g', ["Ғ"]='Ɣ', ["ғ"]='ɣ', ["Д"]='D', ["д"]='d', ["Е"]='E', ["е"]='e', ["Ё"]='Yo', ["ё"]='yo', ["Ж"]='Ǯ', ["ж"]='ǯ', ["З"]='Z', ["з"]='z', ["И"]='I', ["и"]='i', ["Й"]='Y', ["й"]='y', ["І"]='Ĭ', ["і"]='ĭ', ["К"]='K', ["к"]='k', ["Л"]='L', ["л"]='l', ["М"]='M', ["м"]='m', ["Н"]='N', ["н"]='n', ["Ң"]='Ŋ', ["ң"]='ŋ', ["О"]='O', ["о"]='o', ["Ö"]='Ö', ["ö"]='ö', ["П"]='P', ["п"]='p', ["Р"]='R', ["р"]='r', ["С"]='S', ["с"]='s', ["Т"]='T', ["т"]='t', ["У"]='U', ["у"]='u', ["Ӱ"]='Ü', ["ӱ"]='ü', ["Ф"]='Pʻ', ["ф"]='pʻ', ["Х"]='Χ', ["х"]='χ', ["Ц"]='C', ["ц"]='c', ["Ч"]='Č', ["ч"]='č', ["Ӌ"]='J', ["ӌ"]='j', ["Ш"]='Š', ["ш"]='š', ["Щ"]='ŠČ', ["щ"]='šč', ['Ъ']='ʺ', ['ъ']='ʺ', ["Ы"]='Ɨ', ["ы"]='ɨ', ["Ь"]="’", ["ь"]="’", ["Э"]='E', ["э"]='e', ["Ю"]='Yu', ["ю"]='yu', ["Я"]='Ya', ["я"]='ya', }

function export.tr(text, lang, sc) -- Ё needs converting if is decomposed text = text:gsub("ё","ё"):gsub("Ё","Ё") -- е after a vowel or at the beginning of a word becomes ye	-- Note that according to modern orthography ее (instead of ээ) is occationally used for long e	text = mw.ustring.gsub(text, "([АОӨУҮЫЯЁЮИЪЬаоөуүыяёюиъь%A][́̀]?)е","%1ye")

text = mw.ustring.gsub(text, "^Е","Ye") text = mw.ustring.gsub(text, "^е","ye") text = mw.ustring.gsub(text, "([^Ѐ-ӿ])Е","%1Ye") text = mw.ustring.gsub(text, "([^Ѐ-ӿ])е","%1ye")

text = mw.ustring.gsub(text, "([ӨҮЕЁЮИЕЬөүэёюиеь%A][́̀]?)Х","%1X") text = mw.ustring.gsub(text, "([ӨҮЕЁЮИЕЬөүэёюиеь%A][́̀]?)х","%1х") text = mw.ustring.gsub(text, "Х([ӨҮЕЁЮИЕЬөүэёюиеь%A][́̀]?)","X%1") text = mw.ustring.gsub(text, "х([ӨҮЕЁЮИЕЬөүэёюиеь%A][́̀]?)","x%1")

return (mw.ustring.gsub(text,'.',tab)) end return export