PHP :: Doc Bug #75371 :: Wrong decimal separator and currency position
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75371 Wrong decimal separator and currency position
Submitted: 2017-10-12 22:46 UTC Modified: 2017-10-13 00:20 UTC
From: erosdelalamo at gmail dot com Assigned:
Status: Open Package: intl (PECL)
PHP Version: 5.6.31 OS: all
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-10-12 22:46 UTC] 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 €


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-13 00:20 UTC] kalle@php.net
-Type: Bug +Type: Documentation Problem
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sat Aug 18 12:01:26 2018 UTC