<?xml version="1.0" encoding="utf-8"?>

<!--
Set of regular expressions patterns (for the child pair/search nodes within
preg_replace node) or the value being searched for (for the child pair/search
nodes within str_replace node) and associated replacements string (pair/replace)
to perform required transliteration from English to Arabic (when function property
is en2ar) or from Arabic to English (when function property is ar2en).
-->

<data file="Transliteration">
  <preg_replace function="en2ar">
    <pair>
      <search>/^au/</search>
      <replace>ا</replace>
    </pair>
    <pair>
      <search>/^a/</search>
      <replace>ا</replace>
    </pair>
    <pair>
      <search>/^e/</search>
      <replace>ا</replace>
    </pair>
    <pair>
      <search>/^i/</search>
      <replace>ا</replace>
    </pair>
    <pair>
      <search>/^mc/</search>
      <replace>ماك</replace>
    </pair>
    <pair>
      <search>/^o/</search>
      <replace>او</replace>
    </pair>
    <pair>
      <search>/^u/</search>
      <replace>ا</replace>
    </pair>
    <pair>
      <search>/^wr/</search>
      <replace>ر</replace>
    </pair>
    <pair>
      <search>/ough$/</search>
      <replace>ه</replace>
    </pair>
    <pair>
      <search>/ue$/</search>
      <replace></replace>
    </pair>
    <pair>
      <search>/a$/</search>
      <replace>ه</replace>
    </pair>
    <pair>
      <search>/s$/</search>
      <replace>س</replace>
    </pair>
  </preg_replace>

  <str_replace function="en2ar">
    <pair>
      <search>ough</search>
      <replace>او</replace>
    </pair>
    <pair>
      <search>alk</search>
      <replace>وك</replace>
    </pair>
    <pair>
      <search>ois</search>
      <replace>وا</replace>
    </pair>
    <pair>
      <search>sch</search>
      <replace>ش</replace>
    </pair>
    <pair>
      <search>tio</search>
      <replace>ش</replace>
    </pair>
    <pair>
      <search>ai</search>
      <replace>اي</replace>
    </pair>
    <pair>
      <search>au</search>
      <replace>او</replace>
    </pair>
    <pair>
      <search>bb</search>
      <replace>ب</replace>
    </pair>
    <pair>
      <search>cc</search>
      <replace>ك</replace>
    </pair>
    <pair>
      <search>ce</search>
      <replace>س</replace>
    </pair>
    <pair>
      <search>ci</search>
      <replace>سي</replace>
    </pair>
    <pair>
      <search>cy</search>
      <replace>سي</replace>
    </pair>
    <pair>
      <search>ch</search>
      <replace>تش</replace>
    </pair>
    <pair>
      <search>ck</search>
      <replace>ك</replace>
    </pair>
    <pair>
      <search>dd</search>
      <replace>د</replace>
    </pair>
    <pair>
      <search>ea</search>
      <replace>ي</replace>
    </pair>
    <pair>
      <search>ee</search>
      <replace>ي</replace>
    </pair>
    <pair>
      <search>ey</search>
      <replace>اي</replace>
    </pair>
    <pair>
      <search>ff</search>
      <replace>ف</replace>
    </pair>
    <pair>
      <search>ge</search>
      <replace>ج</replace>
    </pair>
    <pair>
      <search>gi</search>
      <replace>جي</replace>
    </pair>
    <pair>
      <search>gg</search>
      <replace>غ</replace>
    </pair>
    <pair>
      <search>gh</search>
      <replace>ف</replace>
    </pair>
    <pair>
      <search>gn</search>
      <replace>جن</replace>
    </pair>
    <pair>
      <search>ie</search>
      <replace>ي</replace>
    </pair>
    <pair>
      <search>kk</search>
      <replace>ك</replace>
    </pair>
    <pair>
      <search>kh</search>
      <replace>خ</replace>
    </pair>
    <pair>
      <search>ll</search>
      <replace>ل</replace>
    </pair>
    <pair>
      <search>mm</search>
      <replace>م</replace>
    </pair>
    <pair>
      <search>nn</search>
      <replace>ن</replace>
    </pair>
    <pair>
      <search>oo</search>
      <replace>و</replace>
    </pair>
    <pair>
      <search>ou</search>
      <replace>و</replace>
    </pair>
    <pair>
      <search>ph</search>
      <replace>ف</replace>
    </pair>
    <pair>
      <search>pp</search>
      <replace>ب</replace>
    </pair>
    <pair>
      <search>qu</search>
      <replace>كو</replace>
    </pair>
    <pair>
      <search>rr</search>
      <replace>ر</replace>
    </pair>
    <pair>
      <search>sh</search>
      <replace>ش</replace>
    </pair>
    <pair>
      <search>ss</search>
      <replace>س</replace>
    </pair>
    <pair>
      <search>th</search>
      <replace>ذ</replace>
    </pair>
    <pair>
      <search>tt</search>
      <replace>ت</replace>
    </pair>
    <pair>
      <search>wr</search>
      <replace>ر</replace>
    </pair>
    <pair>
      <search>a</search>
      <replace>ا</replace>
    </pair>
    <pair>
      <search>b</search>
      <replace>ب</replace>
    </pair>
    <pair>
      <search>c</search>
      <replace>ك</replace>
    </pair>
    <pair>
      <search>d</search>
      <replace>د</replace>
    </pair>
    <pair>
      <search>e</search>
      <replace></replace>
    </pair>
    <pair>
      <search>f</search>
      <replace>ف</replace>
    </pair>
    <pair>
      <search>g</search>
      <replace>غ</replace>
    </pair>
    <pair>
      <search>h</search>
      <replace>ه</replace>
    </pair>
    <pair>
      <search>i</search>
      <replace>ي</replace>
    </pair>
    <pair>
      <search>j</search>
      <replace>ج</replace>
    </pair>
    <pair>
      <search>k</search>
      <replace>ك</replace>
    </pair>
    <pair>
      <search>l</search>
      <replace>ل</replace>
    </pair>
    <pair>
      <search>m</search>
      <replace>م</replace>
    </pair>
    <pair>
      <search>n</search>
      <replace>ن</replace>
    </pair>
    <pair>
      <search>o</search>
      <replace>و</replace>
    </pair>
    <pair>
      <search>p</search>
      <replace>ب</replace>
    </pair>
    <pair>
      <search>q</search>
      <replace>ك</replace>
    </pair>
    <pair>
      <search>r</search>
      <replace>ر</replace>
    </pair>
    <pair>
      <search>s</search>
      <replace>س</replace>
    </pair>
    <pair>
      <search>t</search>
      <replace>ت</replace>
    </pair>
    <pair>
      <search>u</search>
      <replace>و</replace>
    </pair>
    <pair>
      <search>v</search>
      <replace>ف</replace>
    </pair>
    <pair>
      <search>w</search>
      <replace>و</replace>
    </pair>
    <pair>
      <search>x</search>
      <replace>كس</replace>
    </pair>
    <pair>
      <search>y</search>
      <replace>ي</replace>
    </pair>
    <pair>
      <search>z</search>
      <replace>ز</replace>
    </pair>
    <pair>
      <search>,</search>
      <replace>،</replace>
    </pair>
    <pair>
      <search>?</search>
      <replace>؟</replace>
    </pair>
  </str_replace>

  <preg_replace function="ar2en">
    <pair>
      <search>/^ال/</search>
      <replace>Al-</replace>
    </pair>
    <pair>
      <search>/^إِي/</search>
      <replace>ei</replace>
    </pair>
    <pair>
      <search>/^عِي/</search>
      <replace>ei</replace>
    </pair>
    <pair>
      <search>/^عُو/</search>
      <replace>ou</replace>
    </pair>
    <pair>
      <search>/ْع$/</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>/ِي$/</search>
      <replace>i</replace>
    </pair>
    <pair>
      <search>/َو$/</search>
      <replace>aw</replace>
    </pair>
    <pair>
      <search>/َي$/</search>
      <replace>ay</replace>
    </pair>
    <pair>
      <search>/^ع/</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>/^أ/</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>/^آ/</search>
      <replace>aa</replace>
    </pair>
  </preg_replace>

  <!-- UNGEGN (1972) -->
  <str_replace function="ar2en">
    <pair>
      <search>Al-ت</search>
      <replace>At-t</replace>
    </pair>
    <pair>
      <search>Al-ث</search>
      <replace>Ath-th</replace>
    </pair>
    <pair>
      <search>Al-د</search>
      <replace>Ad-d</replace>
    </pair>
    <pair>
      <search>Al-ذ</search>
      <replace>Adh-dh</replace>
    </pair>
    <pair>
      <search>Al-ر</search>
      <replace>Ar-r</replace>
    </pair>
    <pair>
      <search>Al-ز</search>
      <replace>Az-z</replace>
    </pair>
    <pair>
      <search>Al-س</search>
      <replace>As-s</replace>
    </pair>
    <pair>
      <search>Al-ش</search>
      <replace>Ash-sh</replace>
    </pair>
    <pair>
      <search>Al-ص</search>
      <replace>As-s</replace>
    </pair>
    <pair>
      <search>Al-ض</search>
      <replace>Ad-d</replace>
    </pair>
    <pair>
      <search>Al-ط</search>
      <replace>At-t</replace>
    </pair>
    <pair>
      <search>Al-ظ</search>
      <replace>Az-z</replace>
    </pair>
    <pair>
      <search>Al-ن</search>
      <replace>An-n</replace>
    </pair>
    <pair>
      <search>ّ</search>
      <replace>#</replace>
    </pair>
    <pair>
      <search>تة</search>
      <replace>t'h</replace>
    </pair>
    <pair>
      <search>ته</search>
      <replace>t'h</replace>
    </pair>
    <pair>
      <search>كة</search>
      <replace>k'h</replace>
    </pair>
    <pair>
      <search>كه</search>
      <replace>k'h</replace>
    </pair>
    <pair>
      <search>ده</search>
      <replace>d'h</replace>
    </pair>
    <pair>
      <search>دة</search>
      <replace>d'h</replace>
    </pair>
    <pair>
      <search>ضه</search>
      <replace>d'h</replace>
    </pair>
    <pair>
      <search>ضة</search>
      <replace>d'h</replace>
    </pair>
    <pair>
      <search>سه</search>
      <replace>s'h</replace>
    </pair>
    <pair>
      <search>سة</search>
      <replace>s'h</replace>
    </pair>
    <pair>
      <search>صه</search>
      <replace>s'h</replace>
    </pair>
    <pair>
      <search>صة</search>
      <replace>s'h</replace>
    </pair>
    <pair>
      <search>َا</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>َي</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>ُو</search>
      <replace>ou</replace>
    </pair>
    <pair>
      <search>ِي</search>
      <replace>ei</replace>
    </pair>
    <pair>
      <search>ً</search>
      <replace>an</replace>
    </pair>
    <pair>
      <search>ٌ</search>
      <replace>un</replace>
    </pair>
    <pair>
      <search>ٍ</search>
      <replace>in</replace>
    </pair>
    <pair>
      <search>َ</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>ِ</search>
      <replace>i</replace>
    </pair>
    <pair>
      <search>ُ</search>
      <replace>u</replace>
    </pair>
    <pair>
      <search>ْ</search>
      <replace></replace>
    </pair>
    <pair>
      <search>ا</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>ب</search>
      <replace>b</replace>
    </pair>
    <pair>
      <search>ت</search>
      <replace>t</replace>
    </pair>
    <pair>
      <search>ث</search>
      <replace>th</replace>
    </pair>
    <pair>
      <search>ج</search>
      <replace>j</replace>
    </pair>
    <pair>
      <search>ح</search>
      <replace>h</replace>
    </pair>
    <pair>
      <search>خ</search>
      <replace>kh</replace>
    </pair>
    <pair>
      <search>د</search>
      <replace>d</replace>
    </pair>
    <pair>
      <search>ذ</search>
      <replace>dh</replace>
    </pair>
    <pair>
      <search>ر</search>
      <replace>r</replace>
    </pair>
    <pair>
      <search>ز</search>
      <replace>z</replace>
    </pair>
    <pair>
      <search>س</search>
      <replace>s</replace>
    </pair>
    <pair>
      <search>ش</search>
      <replace>sh</replace>
    </pair>
    <pair>
      <search>ص</search>
      <replace>s</replace>
    </pair>
    <pair>
      <search>ض</search>
      <replace>d</replace>
    </pair>
    <pair>
      <search>ط</search>
      <replace>t</replace>
    </pair>
    <pair>
      <search>ظ</search>
      <replace>z</replace>
    </pair>
    <pair>
      <search>ع</search>
      <replace>'</replace>
    </pair>
    <pair>
      <search>غ</search>
      <replace>gh</replace>
    </pair>
    <pair>
      <search>ف</search>
      <replace>f</replace>
    </pair>
    <pair>
      <search>ق</search>
      <replace>q</replace>
    </pair>
    <pair>
      <search>ك</search>
      <replace>k</replace>
    </pair>
    <pair>
      <search>ل</search>
      <replace>l</replace>
    </pair>
    <pair>
      <search>م</search>
      <replace>m</replace>
    </pair>
    <pair>
      <search>ن</search>
      <replace>n</replace>
    </pair>
    <pair>
      <search>ه</search>
      <replace>h</replace>
    </pair>
    <pair>
      <search>ة</search>
      <replace>h</replace>
    </pair>
    <pair>
      <search>و</search>
      <replace>w</replace>
    </pair>
    <pair>
      <search>ي</search>
      <replace>y</replace>
    </pair>
    <pair>
      <search>ى</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>أ</search>
      <replace>'a</replace>
    </pair>
    <pair>
      <search>إ</search>
      <replace>i</replace>
    </pair>
    <pair>
      <search>ء</search>
      <replace>'a</replace>
    </pair>
    <pair>
      <search>ؤ</search>
      <replace>u'</replace>
    </pair>
    <pair>
      <search>ئ</search>
      <replace>'i</replace>
    </pair>
    <pair>
      <search>آ</search>
      <replace>'aa</replace>
    </pair>
    <pair>
      <search>ْ</search>
      <replace></replace>
    </pair>
    <pair>
      <search>،</search>
      <replace>,</replace>
    </pair>
    <pair>
      <search>؟</search>
      <replace>?</replace>
    </pair>
  </str_replace>

  <str_replace function="diaritical">
    <pair>
      <search>Al-ص</search>
      <replace>Aș-ș</replace>
    </pair>
    <pair>
      <search>Al-ض</search>
      <replace>Aḑ-ḑ</replace>
    </pair>
    <pair>
      <search>Al-ط</search>
      <replace>Aț-ț</replace>
    </pair>
    <pair>
      <search>Al-ظ</search>
      <replace>Az̧-z̧</replace><!-- UTF8 z-cedilla -->
    </pair>
    <pair>
      <search>َا</search>
      <replace>ā</replace>
    </pair>
    <pair>
      <search>ُو</search>
      <replace>ū</replace>
    </pair>
    <pair>
      <search>َى</search>
      <replace>á</replace>
    </pair>
    <pair>
      <search>ص</search>
      <replace>ș</replace>
    </pair>
    <pair>
      <search>ض</search>
      <replace>ḑ</replace>
    </pair>
    <pair>
      <search>ط</search>
      <replace>ț</replace>
    </pair>
    <pair>
      <search>آ</search>
      <replace>ā</replace>
    </pair>
    <pair>
      <search>ظ</search>
      <replace>z̧</replace><!-- UTF8 z-cedilla -->
    </pair>
    <pair>
      <search>ح</search>
      <replace>ḩ</replace>
    </pair>
    <pair>
      <search>ِي</search>
      <replace>ī</replace>
    </pair>
  </str_replace>

  <!-- Royal Jordanian Geographic Center -->
  <str_replace function="RJGC">
    <pair>
      <search>ḑ</search>
      <replace>ḏ</replace>
    </pair>
    <pair>
      <search>ș</search>
      <replace>s̱</replace><!-- UTF8 s-sub macron -->
    </pair>
    <pair>
      <search>ț</search>
      <replace>ṯ</replace>
    </pair>
    <pair>
      <search>z̧</search><!-- UTF8 z-cedilla -->
      <replace>ḏh</replace>
    </pair>
    <pair>
      <search>ḩ</search>
      <replace>ẖ</replace>
    </pair>
  </str_replace>

  <!-- The Survey of Egypt System -->
  <str_replace function="SES">
    <pair>
      <search>á</search>
      <replace>a</replace>
    </pair>
    <pair>
      <search>ā</search>
      <replace>â</replace>
    </pair>
    <pair>
      <search>aw</search>
      <replace>ô</replace>
    </pair>
    <pair>
      <search>ay</search>
      <replace>ei</replace>
    </pair>
    <pair>
      <search>ḑ</search>
      <replace>ḍ</replace>
    </pair>
    <pair>
      <search>ḩ</search>
      <replace>ḥ</replace>
    </pair>
    <pair>
      <search>ī</search>
      <replace>î</replace>
    </pair>
    <pair>
      <search>j</search>
      <replace>g</replace>
    </pair>
    <pair>
      <search>ș</search>
      <replace>ṣ</replace>
    </pair>
    <pair>
      <search>ț</search>
      <replace>ṭ</replace>
    </pair>
    <pair>
      <search>ū</search>
      <replace>û</replace>
    </pair>
    <pair>
      <search>z̧</search><!-- UTF8 z-cedilla -->
      <replace>ẓ</replace>
    </pair>
  </str_replace>

  <!-- The transliteration ISO 233:1984 -->
  <str_replace function="ISO233">
    <pair>
      <search>َا</search>
      <replace>a'</replace>
    </pair>
    <pair>
      <search>ِي</search>
      <replace>iy</replace>
    </pair>
    <pair>
      <search>ُو</search>
      <replace>uw</replace>
    </pair>
    <pair>
      <search>ً</search>
      <replace>á</replace>
    </pair>
    <pair>
      <search>ٌ</search>
      <replace>ú</replace>
    </pair>
    <pair>
      <search>ٍ</search>
      <replace>í</replace>
    </pair>
    <pair>
      <search>ذ</search>
      <replace>ḏ</replace>
    </pair>
    <pair>
      <search>غ</search>
      <replace>ġ</replace>
    </pair>
    <pair>
      <search>خ</search>
      <replace>ẖ</replace>
    </pair>
    <pair>
      <search>ش</search>
      <replace>š</replace>
    </pair>
    <pair>
      <search>ث</search>
      <replace>ṯ</replace>
    </pair>
    <pair>
      <search>ض</search>
      <replace>ḍ</replace>
    </pair>
    <pair>
      <search>ة</search>
      <replace>ṫ</replace>
    </pair>
    <pair>
      <search>ح</search>
      <replace>ḥ</replace>
    </pair>
    <pair>
      <search>ج</search>
      <replace>ǧ</replace>
    </pair>
    <pair>
      <search>ص</search>
      <replace>ṣ</replace>
    </pair>
    <pair>
      <search>ط</search>
      <replace>ṭ</replace>
    </pair>
    <pair>
      <search>ظ</search>
      <replace>ẓ</replace>
    </pair>
  </str_replace>

</data>
