PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Numbers » Numbers_Words

The PEAR Numbers_Words package provides methods for spelling numerals in words.

This package is unmaintained.

Download latest release 0.18.2 (there might be newer Composer installable version)

License: PHP

Description

With Numbers_Words class you can convert numbers
written in arabic digits to words in several languages.
You can convert an integer between -infinity and infinity.
If your system does not support such long numbers you can
call Numbers_Words::toWords() with just a string.

With the Numbers_Words::toCurrency($num, $locale, 'USD') method
you can convert a number (decimal and fraction part) to words with currency name.

The following languages are supported:
* bg (Bulgarian) by Kouber Saparev
* cs (Czech) by Petr 'PePa' Pavel
* de (German) by Piotr Klaban
* dk (Danish) by Jesper Veggerby
* en_100 (Donald Knuth system, English) by Piotr Klaban
* en_GB (British English) by Piotr Klaban
* en_US (American English) by Piotr Klaban
* es (Spanish Castellano) by Xavier Noguer
* es_AR (Argentinian Spanish) by Martin Marrese
* et (Estonian) by Erkki Saarniit
* fr (French) by Kouber Saparev
* fr_BE (French Belgium) by Kouber Saparev and Philippe Bajoit
* he (Hebrew) by Hadar Porat
* hu_HU (Hungarian) by Nils Homp
* id (Indonesian) by Ernas M. Jamil and Arif Rifai Dwiyanto
* it_IT (Italian) by Filippo Beltramini and Davide Caironi
* lt (Lithuanian) by Laurynas Butkus
* nl (Dutch) by WHAM van Dinter
* pl (Polish) by Piotr Klaban
* pt_BR (Brazilian Portuguese) by Igor Feghali
* ro_RO (Romanian) by Bogdan Stancescu
* ru (Russian) by Andrey Demenev
* sv (Swedish) by Robin Ericsson
* tr_TR (Turkish) by Shahriyar Imanov
* ua (Ukrainian) by Andrey Demenev and Vital Leshchyk

Maintainers

Dependencies

Required

Releases

Bugs

IDStatusTypeVersionDateSummary
#1488ClosedBug2004-05-24towords error on PHP5
#1765BogusBug2004-07-01toCurrency() Pb with french
#2076ClosedBug2004-08-06bug in /Words/lang.ru.php
#2411ClosedBug2004-09-28Wrong spelling in german file
#2560BogusBug2004-10-18missing currencies
#2597ClosedReq2004-10-23Add a CVS link on package info page
#3751ClosedBug2005-03-08toCurrency incorrectly translates decimal points
#4651ClosedBug2005-06-21Incorrect suffix toCurrency with GBP
#4652ClosedBug2005-06-21problem with en_GB locale
#5618ClosedBug2005-10-06locale name for Estonian is wrong
#6654ClosedBug0.14.02006-02-01russian locale - wrong toCurrency
#7339ClosedReq0.14.02006-04-07Numbers Words list of languages
#7873DuplicateBug0.14.02006-06-12Wrong number convertation with Russian locale
#8623BogusBug0.15.02006-09-03Hungarian translation
#10744ClosedBugCVS2007-04-16Docblock for getLocales() is totally wrong
#12512ClosedBug0.15.02007-11-23incorrect declaration of toWords() in lang.fr.php (and others!)
#14272No FeedbackBug0.15.02008-07-01italian language problem (error converting millions)
#14667ClosedBug0.15.02008-09-19bad trascription for 101 numbers and 102 thousands
#14746ClosedReqCVS2008-10-05Swap to PHPUnit 3
#14988ClosedBug0.15.02008-11-10Non-int parsing returns bogus result
#15145ClosedReqCVS2008-11-24PHPCS results - 2098 errors and 422 warnings
#15146OpenReqCVS2008-11-24DRY - refactor common, duplicated code
#15149ClosedReqCVS2008-11-24Dramatically increase test coverage
#15166OpenReqCVS2008-11-26Think about generating an E_NOTICE if PHP_INT_SIZE is exceeded
#15260ClosedBugCVS2008-12-06Uninitialized string offset: 0 /usr/share/php/Numbers/Words/lang.pt_BR.php:248
#16019ClosedBugCVS2009-03-11Wrong behavior for the Italian driver
#16435ClosedBug0.16.12009-07-14improper use of substr() in lang.pl.php
#16667ClosedReq0.16.12009-10-01hungarian 40 is incorrect
#16732AssignedReq0.16.12009-10-23Charsets/Locale should be handled
#16733ClosedBug0.16.12009-10-23Integral part treated incorrectly
#17373ClosedBug0.16.12010-05-06bug in toWords function for hungarian translation
#17392ClosedBug0.16.22010-05-12bugs in toWords function for hungarian translation
#17442No FeedbackReqUnknown2010-05-26Dutch 'toCurrencyWords' does not exist
#17754ClosedBugSVN2010-08-19Patch: Using explode instead of split
#17763ClosedReqUnknown2010-08-20tr_TR Lang support
#17794ClosedBugSVN2010-08-22Patch: avoiding split in es_MX file
#18248ClosedBug0.16.22011-02-07lithuanian chars are not in UTF-8
#18501ClosedBug0.16.22011-05-03incorrect declaration of toWords() in lang.fr.php
#19013ClosedBugSVN2011-11-14remove error_reporting (for PEAR QA team)
#19395SuspendedBug0.16.42012-04-23Most Languages Seem to be broken
#19453ClosedBug0.16.42012-06-03Hungarian language wrong spelling
#19543ClosedBug2012-08-03comma breaks toCurrency
#19855ClosedBug2013-03-12Undefined property Text_CAPTCHA_Driver_Word::$locale
#19895No FeedbackBug0.16.42013-04-12broken digit conversion in lang.tr_TR
#20380No FeedbackReqSVN2014-08-29Add new languages
#20435ClosedBug0.18.02014-11-01Missing files in PEAR archive
#20495OpenBugSVN2015-01-29Long-scale naming vs Short-scale naming
#20544OpenBug0.18.12015-05-07Missing spaces in nl
#20953No FeedbackBug0.18.12015-09-30Fatal error: Uncaught exception 'Numbers_Words_Exception' with message 'Unable
#20954DuplicateBug0.18.12015-09-30Fatal error: Uncaught exception 'Numbers_Words_Exception' with message 'Unable
#21226VerifiedBug0.18.12017-07-06es_AR