local U = mw.ustring.char
local gsub = mw.ustring.gsub
local export = {}
local hri = ''
local hri2 = '𑊁'
local diri = U(0x940)
local diri2 = ''
local hru = ''
local hru2 = '𑊂'
local diru = ''
local diru2 = '𑊂'
local E = ''
local E2 = '𑊃'
local AI = ''
local AI2 = '𑊃'
local O = ''
local O2 = '𑊂'
local AU = ''
local AU2 = '𑊂'
local A = '𑊀'
local LA = ''
local ret = U(0x615)
local halant = U(0x94D)
local zabar = U(0x64E)
local zer = U(0x650)
local pesh = U(0x64F)
local tashdid = U(0x651) -- also called shadda
local jazm = "ْ"
local he = "ہ"
local consonants = "ببپتثجچحخدذرزژسشصضطظعغفقکگلࣇمنݨوہھٹڈںڑشؕ"
local consonantS = "ببپتثجچحخدذرزژسشصضطظعغفقکگلࣇمنݨہھٹڈںڑشؕ"
local consonantS2 = "یببپتثجچحخدذرزژسشصضطظعغفقکگلࣇمنݨںوہھٹڈڑشؕ"
local sun = "تثصشسزرذدنلطظض"
local vowels = "ایئےۓوؤ"
local hes = "ہح"
local diacritics = "َُِّْٰ"
local ZZP = "َُِ"
local hiPD = ""
local mapping = {
= '𑊀', = '𑊝', = '𑊛',
= '𑊖', = '𑊐', = '𑊥',
= '𑊌', = '𑊊', = '𑊦',
= '𑊅', = '𑊘', = '𑊒',
= '𑊌', = '𑊢', = "𑊧",
= '𑊌', = '𑊥', = '𑊥',
= '𑊥', = '𑊥', = '𑊌',
= '𑊖', = '𑊌', = '𑊆',
= '𑊜', = '𑊄', = '𑊄',
= '𑊆', = '𑊣', = '𑊠',
= '𑊚', = '𑊤', = '𑊦',
= '𑊡',
= '',
= '𑊆', = '𑊓', = '𑊍',
= '𑊕', = '𑊣', = '𑊄',
= '𑊀',
= '',
= '',
= '𑊂',
= '',
-- diacritics
= "॑",
= "" .. hri .. "",
= "" .. hru .. "",
= "",
= "-", -- ZWNJ (zero-width non-joiner)
-- ligatures
= "𑊣",
= "𑊀𑊣𑊦",
-- kashida
= "-", -- kashida, no sound
-- numerals
= "੧", = "੨", = "੩", = "੪", = "੫",
= "੬", = "੭", = "੮", = "੯", = "੦",
= "੧", = "੨", = "੩", = "੪", = "੫",
= "੬", = "੭", = "੮", = "੯", = "੦",
-- punctuation (leave on separate lines)
= "।",
= "?", -- question mark
= ",", -- comma
= ";", -- semicolon
= '“', -- quotation mark
= '”', -- quotation mark
= "%", -- percent
= "‰", -- per mille
= ".", -- decimals
= ",", -- thousand
= "-𑊃",
= "-𑊃" -- he ye (in ezâfe)
}
local ain = 'ع'
local kzabar = 'ٰ'
local alif = 'ا'
local madda = 'آ'
local ye = 'ی'
local ye2 = 'ئ'
local ye3 = "ے"
local vao = "و"
local ye4 = "ۓ"
local he2 = "ۂ"
local aspirate = 'ھ'
local lam = 'ل'
local noon = 'ن'
local gunDia = '٘'
function export.tr(text, lang, sc)
text = gsub(text, "ۂ ", "-𑊃-")
text = gsub(text, "ۓ ", "-𑊃-")
text = gsub(text, "ࣇ", "𑊣")
text = gsub(text, "شؕ", "𑊥")
text = gsub(text, "کھ", "𑊅")
text = gsub(text, "گھ", "𑊈")
text = gsub(text, "چھ", "𑊋")
text = gsub(text, "جھ", "𑊌")
text = gsub(text, "ٹھ", "𑊐")
text = gsub(text, "ڈھ", "𑊔")
text = gsub(text, "تھ", "𑊗")
text = gsub(text, 'دھ', "𑊙")
text = gsub(text, "پھ", "𑊜")
text = gsub(text, "بھ", "𑊟")
text = gsub(text, "ڑھ", "𑊨")
text = gsub(text, "مھ", "𑊠𑊦")
text = gsub(text, "نھ", "𑊚𑊦")
text = gsub(text, "لھ", "𑊣𑊦")
text = gsub(text, "بھ", "𑊟")
text = gsub(text, "ۂ", "-𑊃")
text = gsub(text, "ے", "")
text = mw.ustring.gsub(text, '.', mapping)
return text
end
return export