ماڊيول:ps-translit
ڏيک
Documentation for this module may be created at ماڊيول:ps-translit/doc
local U = mw.ustring.char
local export = {}
local gsub = mw.ustring.gsub
local cons = "ګټڅڅځډړږښڼکهيبپتثجچحخدزذرسشصضعغفقلمنوژطظ"
local yee = "ي"
local mapping = {
["ٽ"]="ٹ",
["څ"]="تْس",
["ځ"]="دْز",
["ډ"]="ڈ",
["ړ"]="ڑ",
["ږ"]="زؕ",
["ښ"]="خؕ",
["ګ"]="گ",
["ڼ"]="ݨ",
["ې"]="ے",
-- يونيڪوڊ برابري
["ک"]="ک",
["ه"]="ہ",
["ي"]="ی",
}
function export.tr(text, lang, sc)
-- وچولي ې
text = gsub(text, yee .. '([' .. cons .. '])', "ی%1")
-- اکرن جي نقل اکري
text = gsub(text, '.', mapping)
return text
end
return export