Skip to content

Commit 3b51e22

Browse files
author
Pharaonic
committedNov 6, 2020
PHP Extension Intl
1 parent 07ebffd commit 3b51e22

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

Diff for: ‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
- ###### Number. (1,020,304,050,607,080)
1414

15-
- ###### NumberToString. ( seven thousand seven hundred twenty-one )
15+
- ###### NumberToString. ( seven thousand seven hundred twenty-one ) {PHP Extension intl}
1616

1717
- ###### HumanNumber. ( 77K || 77.4K || 77.37K )
1818

Diff for: ‎src/Readable.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public static function getNumberToString($input, string $lang = 'en'): string
8686
if (!in_array(gettype($input), ['integer', 'double', 'float'])) throw new TypeError("Wrong Input Type.");
8787

8888
$digit = new \NumberFormatter($lang, \NumberFormatter::SPELLOUT);
89-
return $digit->format($input);
89+
$input = $digit->format($input);
90+
return $lang == 'ar' ? str_replace('و ', 'و', $input) : $input;
9091
}
9192

9293
/**

0 commit comments

Comments
 (0)
Please sign in to comment.