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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: erosdelalamo at gmail dot com
New email:
PHP Version: OS:

 

 [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: Wed Dec 12 11:01:26 2018 UTC