Locale aware percentage sign
-
The percent sign in the savings text is not locale aware. For example, Turkish is a left-to-right language but the percent sign comes before the number.
Could you please allow it to be configured or generate the text using locale aware methods?

foreach (['tr_TR', 'en_US', 'ar_SA', 'ar-u-nu-latn'] as $locale) {
$numberFormatter = new NumberFormatter($locale, NumberFormatter::PERCENT);
echo "$locale: 0.7 => " . $numberFormatter->format(0.7) . PHP_EOL;
}
tr_TR: 0.7 => %70
en_US: 0.7 => 70%
ar_SA: 0.7 => ٧٠٪
ar-u-nu-latn: 0.7 => 70%
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.