Skip to content

Commit

Permalink
Arabic non-vocalised text Transliterate
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyshantha committed Aug 28, 2023
1 parent af43eb2 commit 7f2ba84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions transliterate.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function transliterate() {

/* VALIDATION
Mālaqa li-Umarāʾ allāh ḥallal al-jalal al-Mālaqī al-Ghassānī al-tarjama al-ilhāmu wa-al-tanbīhāt
ẓaninn
U+0644 + U+0627 != U+FEFB (lam + alef != la ligature)
*/

Expand Down Expand Up @@ -349,7 +349,11 @@ function transliterate() {
let processed = "";

for (let i = 0; i < unprocessed.length; i++) {
processed = processed + unprocessed[i] + ' ' + unprocessed[i].replace("ا","أ") + ' ';
if (unprocessed[i].indexOf("al-") > -1) {
processed = processed + unprocessed[i] + ' ' + unprocessed[i].replace("ا","أ") + ' ';
} else {
processed = processed + unprocessed[i] + ' ';
}
}
resultAr = processed;
}
Expand Down

0 comments on commit 7f2ba84

Please sign in to comment.