มอดูล:kk-translit
- The following documentation is located at มอดูล:kk-translit/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
This module will transliterate ภาษาคาซัค text.
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:kk-translit/testcases.
Functions
tr(text, lang, sc)
- Transliterates a given piece of
text
written in the script specified by the codesc
, and language specified by the codelang
. - When the transliteration fails, returns
nil
.
local export = {}
local tt = {
["ү"]="ü",['Ү']='Ü', ["т"]="t",['Т']='T', ["һ"]="h",['Һ']='H', ["р"]="r",['Р']='R', ["ф"]="f",['Ф']='F',
["ю"]="yu",['Ю']='Yu', ["ш"]="ş",['Ш']='Ş', ["ь"]="ʹ",['Ь']='ʹ', ["ъ"]="ʺ",['Ъ']='ʺ', ["н"]="n",['Н']='N',
["п"]="p",['П']='P', ["й"]="y",['Й']='Y', ["л"]="l",['Л']='L', ["з"]="z",['З']='Z', ["е"]="e",['Е']='E',
["г"]="g",['Г']='G', ["б"]="b",['Б']='B', ["у"]="w",['У']='W', ["с"]="s",['С']='S', ["х"]="x",['Х']='X',
["ч"]="ç",['Ч']='Ç', ["щ"]="şş",['Щ']='Şş', ["я"]="ya",['Я']='Ya', ["ы"]="ı",['Ы']='I', ["э"]="e",['Э']='E',
["м"]="m",['М']='M', ["о"]="o",['О']='O', ["и"]="ï",['И']='Ï', ["ё"]="yo",['Ё']='Yo', ["ж"]="j",['Ж']='J',
["к"]="k",['К']='K', ["д"]="d",['Д']='D', ["в"]="v",['В']='V', ["ц"]="c",['Ц']='C', ["а"]="a",['А']='A',
["ң"]="ñ",['Ң']='Ñ', ["ә"]="ä",['Ә']='Ä', ["э"]="é",['Э']='É', ["ұ"]="u",['Ұ']='U', ["қ"]="q",['Қ']="Q",
["ғ"]="ğ",['Ғ']='Ğ', ["і"]="i",['І']='İ', ["ө"]="ö",['Ө']='Ö'
};
function export.tr(text)
return (mw.ustring.gsub(text, '.', tt))
end
return export