summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_name.php2
-rw-r--r--includes/functions/functions_rtl.php4
-rw-r--r--includes/functions/functions_utf-8.php20
3 files changed, 13 insertions, 13 deletions
diff --git a/includes/functions/functions_name.php b/includes/functions/functions_name.php
index 14ca759ef2..f15e697c3e 100644
--- a/includes/functions/functions_name.php
+++ b/includes/functions/functions_name.php
@@ -164,7 +164,7 @@ function DMSoundex($name) {
// Initialize
$name_script = utf8_script($name);
- if ($name_script == 'hebrew' || $name_script == 'arabic') $noVowels = true;
+ if ($name_script == 'Hebr' || $name_script == 'Arab') $noVowels = true;
else $noVowels = false;
$lastPos = strlen($name) - 1;
$currPos = 0;
diff --git a/includes/functions/functions_rtl.php b/includes/functions/functions_rtl.php
index 95ec92b1a0..90e0ba6e17 100644
--- a/includes/functions/functions_rtl.php
+++ b/includes/functions/functions_rtl.php
@@ -392,7 +392,7 @@ function spanLTRRTL($inputText, $direction='BOTH', $class='') {
}
$textSpan = stripLRMRLM(substr($result, $lenStart+3, $spanEnd-$lenStart-3));
$langSpan = utf8_script($textSpan);
- if ($langSpan == 'hebrew' || $langSpan == 'arabic') {
+ if ($langSpan == 'Hebr' || $langSpan == 'Arab') {
break;
}
$result = $startLTR . substr($result, $lenStart, $spanEnd-$lenStart) . substr($result, $spanEnd+$lenStart+$lenEnd);
@@ -1126,7 +1126,7 @@ function reverseText($text) {
$text = strip_tags(html_entity_decode($text,ENT_COMPAT,'UTF-8'));
$text = str_replace(array('‎', '‏', WT_UTF8_LRM, WT_UTF8_RLM), '', $text);
$textLanguage = utf8_script($text);
- if ($textLanguage!='hebrew' && $textLanguage!='arabic') return $text;
+ if ($textLanguage!='Hebr' && $textLanguage!='Arab') return $text;
$reversedText = '';
$numbers = '';
diff --git a/includes/functions/functions_utf-8.php b/includes/functions/functions_utf-8.php
index b089137720..872413a33f 100644
--- a/includes/functions/functions_utf-8.php
+++ b/includes/functions/functions_utf-8.php
@@ -45,15 +45,15 @@ function utf8_script($string) {
}
// Try language-specific conversion before generic conversion
if (strpos(WT_UTF8_LATIN_CHARACTERS, $chr)!==false) {
- return 'latin';
+ return 'Latn';
} elseif (strpos(WT_UTF8_CYRILLIC_CHARACTERS, $chr)!==false) {
- return 'cyrillic';
+ return 'Cyrl';
} elseif (strpos(WT_UTF8_HEBREW_CHARACTERS, $chr)!==false) {
- return 'hebrew';
+ return 'Hebr';
} elseif (strpos(WT_UTF8_GREEK_CHARACTERS, $chr)!==false) {
- return 'greek';
+ return 'Grek';
} elseif (strpos(WT_UTF8_ARABIC_CHARACTERS, $chr)!==false) {
- return 'arabic';
+ return 'Arab';
}
$pos+=$chrlen;
}
@@ -64,12 +64,12 @@ function utf8_script($string) {
// Determine whether a string contains LTR or RTL characters
function utf8_direction($string) {
switch (utf8_script($string)) {
- case 'latin':
- case 'cyrillic':
- case 'greek':
+ case 'Latn':
+ case 'Cyrl':
+ case 'Grek':
return 'ltr';
- case 'arabic':
- case 'hebrew':
+ case 'Arab':
+ case 'Hebr':
return 'rtl';
default:
return 'unknown';