Doc #75371 [Opn->Nab]: Wrong decimal separator and currency position

From: Date: Fri, 12 Feb 2021 13:25:04 +0000
Subject: Doc #75371 [Opn->Nab]: Wrong decimal separator and currency position
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18533@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75371&edit=1 ID: 75371 Updated by: cmb@php.net Reported by: erosdelalamo at gmail dot com Summary: Wrong decimal separator and currency position -Status: Open +Status: Not a bug Type: Documentation Problem Package: intl Operating System: all PHP Version: 5.6.31 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: en_FR makes no sense, since English isn't an official language in France, so Intl falls back to en, what should be expected. Previous Comments: ------------------------------------------------------------------------ [2017-10-12 22:46:35] erosdelalamo at gmail dot com Description: ------------ --- From manual page: http://www.php.net/numberformatter.formatcurrency --- Decimal and thousand separator and currency position are based on language instead Country. I.e.: A website in english targeting france en_FR displays currency with british format Test script: --------------- // Locale: en_GB $fmt = new NumberFormatter( 'en_GB', NumberFormatter::CURRENCY ); echo $fmt->formatCurrency(1234567.891234567890000, "EUR")."\n"; // output €1,234,567.89 // Locale: en_FR $fmt = new NumberFormatter( 'en_FR', NumberFormatter::CURRENCY ); echo $fmt->formatCurrency(1234567.891234567890000, "EUR")."\n"; // output €1,234,567.89, should be 1.234.567,89 € ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75371&edit=1

« previous php.doc.bugs (#18533) next »