মডিউল:uz-translit
অবয়ব
এই মডিউলের জন্য মডিউল:uz-translit/নথি-এ নথিপত্র তৈরি করা হয়ে থাকতে পারে
local export = {}
local tt={
["т"]="t",["Т"]="T", ["р"]="r",["Р"]="R", ["ф"]="f",["Ф"]="F",
["ю"]="yu",["Ю"]="Yu", ["ш"]="sh",["Ш"]="Sh", ["ҳ"]="h",["Ҳ"]="H", ["ъ"]="’",["Ъ"]="’", ["н"]="n",["Н"]="N",
["п"]="p",["П"]="P", ["й"]="y",["Й"]="Y", ["л"]="l",["Л"]="L", ["з"]="z",["З"]="Z", ["е"]="e",["Е"]="E",
["г"]="g",["Г"]="G", ["б"]="b",["Б"]="B", ["у"]="u",["У"]="U", ["с"]="s",["С"]="S", ["х"]="x",["Х"]="X",
["ч"]="ch",["Ч"]="Ch", ["я"]="ya",["Я"]="Ya",
["м"]="m",["М"]="M", ["о"]="o",["О"]="O", ["и"]="i",["И"]="I", ["ё"]="yo",["Ё"]="Yo", ["ж"]="j",["Ж"]="J",
["к"]="k",["К"]="K", ["д"]="d",["Д"]="D", ["в"]="v",["В"]="V", ["а"]="a",["А"]="A",
["ӯ"]="oʻ",["Ӯ"]="Oʻ", ["э"]="e",["Э"]="E", ["қ"]="q",["Қ"]="Q", ["ғ"]="gʻ",["Ғ"]="Gʻ"
};
function export.tr(text, lang, sc)
text = mw.ustring.gsub(
text,
"([АОУЕЯЁЮИЕаоуэяёюие][́̀]?)([ЕеИи])",
function(a, e)
local iotated = {
['е'] = 'ye',
['Е'] = 'Ye',
['и'] = 'yi',
['И'] = 'Yi',
}
return a .. iotated[e]
end
)
text:gsub("^Е",'Ye'):gsub("^е",'ye')
return (mw.ustring.gsub(text, '.', tt))
end
return export