وحدة:he-translit
يمكن إنشاء صفحة توثيق الوحدة في وحدة:he-translit/شرح
local export = {}
local tt = {
["א"]="'",
["ע"]="'",
["בּ"]='b', ["ב"]='v',
["ג"]='g', ["ד"]='d', ["ה"]='h', ["ו"]='v', ["ז"]='z', ["ח"]='kh', ["ט"]='t',
["י"]='y', ["כ"]='kh', ["ך"]='kh', ["ל"]='l', ["מ"]='m', ["ם"]='m', ["נ"]='n', ["ן"]='n',
["ס"]='s', ["פ"]='f', ["ף"]='f', ["צ"]='ts', ["ץ"]='ts', ["ק"]='k',
["ר"]='r', ["ש"]='(s/sh)', ["שׂ"]='s', ["שׁ"]='sh',
["ת"]='t',
["וּ"]='(u/v)', ["וֹ"]="o",
["פּ"]="p", ["ףּ"]="p",
["כּ"]='k', ["ךּ"]='k',
--
["\214\176"]="'", -- HEBREW POINT SHEVA
["\214\177"]="e", -- HEBREW POINT HATAF SEGOL
["\214\178"]="a", -- HEBREW POINT HATAF PATAH
["\214\179"]="o", -- HEBREW POINT HATAF QAMATS
["\214\180"]="i", -- HEBREW POINT HIRIQ
["\214\181"]="ei", -- HEBREW POINT TSERE
["\214\182"]="e", -- HEBREW POINT SEGOL
["\214\183"]="a", -- HEBREW POINT PATAH
["\214\184"]="(a/o)", -- HEBREW POINT QAMATS
["\214\185"]="o", -- HEBREW POINT HOLAM
["\214\187"] = "u", -- HEBREW POINT QUBUTS
["\214\188"] = "", -- HEBREW POINT DAGESH OR MAPIQ
["\215\129"] = "", -- HEBREW POINT SHIN DOT
["\215\130"] = "", -- HEBREW POINT SIN DOT
}
function export.tr(text, lang, sc)
text = text:gsub("חַ$","ach"):gsub("חַ(%s)","ach%1")
text = text:gsub("עַ$","a'"):gsub("עַַ(%s)","a'%1")
text = mw.ustring.gsub(text, '([\214\176\214\177\214\178\214\179\214\180\214\181\214\182\214\183\214\184\214\187])([\214\185\214\188\215\129\215\130])', "%2%1")
text = mw.ustring.gsub(text, '.[\214\185\214\188\215\129\215\130]', tt)
text = mw.ustring.gsub(text, '.', tt)
return text
end
return export