php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75305 Number Formatter Can not spell in indian rupee format
Submitted: 2017-10-03 03:51 UTC Modified: 2017-11-05 04:22 UTC
From: anil dot pokhariyal1 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: intl (PECL)
PHP Version: 5.6.31 OS: Windows 8
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: anil dot pokhariyal1 at gmail dot com
New email:
PHP Version: OS:

 

 [2017-10-03 03:51 UTC] anil dot pokhariyal1 at gmail dot com
Description:
------------
I want to convert a amount to word using numberformatter as indian format i.e. in lakh and crore. but it only works for million and billions.
I want to SPELL a amount like 1230000 as twelve lakh thirty thousand Only.
Please provide this functionality or let me know if there is a way for it to get localize.

Test script:
---------------
$objNum = new NumberFormatter("en", NumberFormatter::SPELLOUT);
$spell = $objNum->format(150000);
print_R($spell);

Expected result:
----------------
One Lakh fifty thousand.

Actual result:
--------------
One fifty thousand Only

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-03 14:22 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2017-10-03 14:22 UTC] cmb@php.net
It seems to me that you have to use a rule based number formatter. See
<https://3v4l.org/> for a quick draft, and
<http://userguide.icu-project.org/formatparse/numbers/rbnf-examples> for further
details.
 [2017-10-03 14:23 UTC] cmb@php.net
Should have been: <https://3v4l.org/NY4RE>
 [2017-10-25 11:39 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2017-10-25 11:39 UTC] cmb@php.net
Would my suggestion be sufficient?
 [2017-11-05 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 09:01:28 2024 UTC