Numbers_Words
pear.php.net
The PEAR Numbers_Words package provides methods for spelling numerals in words.
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_IN (Indian English) by Piotr Klaban * en_US (American English) by Piotr Klaban * es (Spanish Castellano) by Xavier Noguer * es_AR (Argentinian Spanish) by Martin Marrese * es_MX (Mexican Spanish) by Martin Marrese and Pavel Oropeza * es_VE (Venezuelan Spanish) by Martin Marrese and Pavel Oropeza * 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 * lv (Latvian) by Andrius Virbicianskas * 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
Piotr Klaban
makler
makler@man.torun.pl no
Kouber Saparev
kouber
kouber@php.net yes
Igor Feghali
ifeghali
ifeghali@php.net yes
Marcelo Subtil Marcal
msmarcal
msmarcal@php.net yes
Xavier Noguer
xnoguer
xnoguer.php@gmail.com yes
Hadar Porat
hadar_p
hpman28@gmail.com yes
2014-11-03
10:51:51
0.18.1
0.18.1
beta
beta
PHP
* Fixed bug #20435: Missing files in PEAR archive [kouber] * Fixed French plural handling for "million" and suffixes above [Olivier Brunel]
5.3.2
1.4.0b1
Math_BigInteger
pear.php.net
0.1
0.1
beta
beta
2002-11-15
PHP License
This is the initial release of the Numbers_Words package.
0.2
0.2
beta
beta
2002-11-19
PHP License
New lang definition file for en_100 (Donald Knuth number system).
0.3
0.3
beta
beta
2002-11-26
PHP License
New lang files for de (German), pt_BR (Brazilian Portuguese), es (Spanish). First PEAR release.
0.4
0.4
beta
beta
2003-09-17
PHP License
New lang files for: ee (Estonian) and it_IT (Italian). Changes to es (extranous spaces) and Words.php (trim output, new function toCurrency() for converting currency values).
0.5
0.5
beta
beta
2003-12-16
PHP License
New file for Bulgarian and French language. toCurrency() method in en_US translation.
0.5.1
0.5.1
beta
beta
2003-12-17
PHP License
Small fix to French translation.
0.6
0.6
beta
beta
2004-04-27
PHP License
New file for Argentinian Spanish, Russian and Indonesian language.
0.7
0.7
beta
beta
2004-04-28
PHP License
New file for Swedish language. Small fix in fr and bg translations.
0.7.1
0.7.1
beta
beta
2004-05-25
PHP License
Small bug fix (use toWords instead of towords) for PHP version 5.
0.8
0.8
beta
beta
2004-06-17
PHP License
New file for Lithuanian language. Fixed a class method finding (should work for PHP5 and PHP4 now).
0.8.1
0.8.1
beta
beta
2004-08-09
PHP License
Fixed two bugs (missing t in 400, and wrong function call) in Russian translation.
0.9.0
0.9.0
beta
beta
2004-08-26
PHP License
New file for Hungarian language (Thanks to Nils Homp).
0.10.0
0.10.0
beta
beta
2004-09-20
PHP License
New file for Danish language (Thanks to Jesper Veggerby).
0.10.1
0.10.1
beta
beta
2004-09-30
PHP License
Small bug fix to German translation (the one thousand) (Thanks to neuner at futureweb dot at).
0.11.0
0.11.0
beta
beta
2004-10-22
PHP License
toCurrencyWords() support in pt_BR translation (Thanks to Mario H.C.T.)
0.12.0
0.12.0
beta
beta
2005-01-11
PHP License
New file for French (Belgium) language (Thanks to Philippe Bajoit).
0.13.0
0.13.0
beta
beta
2005-02-28
PHP License
New files for Czech (thanks to Petr 'PePa' Pavel) and Hebrew (thanks to Hadar Porat) languages.
0.13.1
0.13.0
beta
beta
2005-03-09
PHP License
Fixed a problem with no leading zero in fraction of the currency value (reported by geekdom at gmail dot com).
0.14.0
0.14.0
beta
beta
2005-09-05
PHP License
Fixed plural of pence (Thanks to Peter Dunham and Rob King). Added toCurrency method to en_GB language file. Fraction part can be written in digits (Thanks to Rob King).
0.15.0
0.15.0
beta
beta
2006-06-13
PHP License
* New file for Dutch language (Thanks to WHAM van Dinter); * package.xml updated to version 2.0; * Bugs fixed: - #5618 locale name (and file name) for Estonian is changed from ee to et; - #6654 bug in Russian translation; * New feature added: - #7339 new Numbers_Words::getLocales() method is available (Thanks to Bertrand Gugger).
0.16.0
0.16.0
beta
beta
2009-03-10
PHP License
* Added numerous language unit tests (Bulgarian, English 100, English GB, English US, French, French Belgium, German, Italian, Portuguese Brazilian); * Swap all tests to PHPUnit 3; * Bugs fixed: - #10744 wrong getLocales() Docblock; - #14988 bogus non-int parsing; - #14667 bad trascription for 101 numbers and 102 thousands bug; - incorrect values for 80 and 81 in French Belgium; - #15260 uninitialized string offset in Brazilian Portuguese.
0.16.1
0.16.0
beta
beta
2010-02-15
PHP License
* Clean up package definition and tests; * Better cast/sanitation of non-integer values; * Fixed bug #16019 (incorrect trimming of vowels in the Italian extension).
0.16.2
0.16.0
beta
beta
2010-05-10
PHP License
* Fixed bug #16435 (improper use of substr() in Polish extension); * Fixed bug #16667 (wrong spelling of 40 in Hungarian extension) (Vlajos); * Fixed bug #16733 (incorrect rounding of cents); * Added optional dependency on Math_BigInteger; * Improved unit tests (Daniel O'Connor).
0.16.3
0.16.0
beta
beta
2011-12-11
PHP License
QA Release Bug #12512 Windows incorrect declaration of toWords() in lang.fr.php (and others!) ifeghali Bug #17373 bug in toWords function for hungarian translation kouber Bug #17392 bugs in toWords function for hungarian translation ifeghali Bug #17754 Patch: Using explode instead of split ifeghali Request #17763 Independent tr_TR Lang support ifeghali Bug #17794 Patch: avoiding split in es_MX file ifeghali Bug #18501 incorrect declaration of toWords() in lang.fr.php kouber Bug #19013 remove error_reporting (for PEAR QA team) ifeghali
0.16.4
0.16.0
beta
beta
2012-03-20
PHP
Currency names for Dutch Re-licensed to PHP 3.01 [ifeghali]
0.17.0
0.17.0
beta
beta
2012-07-01
PHP
Drop PHP 4 Drop PEAR dependency Misc fixes and cleanup in Turkish driver
0.18.0
0.18.0
beta
beta
2014-10-24
PHP
* Fixed bug #19453: Incorrect spelling of Hungarian numbers [kouber] * Fixed bug #19543: Better handling of decimal mark and thousands separators [kouber] * Fixed bug #19855: Do not emit E_NOTICE when calling toWords() statically [cweiske] * Fixed pl unicode [Jakub Roszkiewicz] * Fixed ru_RU currency codes [Vital Leshchyk] * Fixed tr_TR unicode [Shahriyar Imanov] * Added en_IN - Indian English [Abhinav Nayak] * Added lv - Latvian [Andrius] * Added ro_RO - Romanian [Bogdan Stancescu] * Added ua - Ukrainian [Vital Leshchyk] * Unify locale loading code [cweiske] * Use PEAR class-to-filename convention [cweiske]

This release changes class names and locations of locale files. This is a backwards compatibility break.
0.18.1
0.18.1
beta
beta
2014-11-03
PHP
* Fixed bug #20435: Missing files in PEAR archive [kouber] * Fixed French plural handling for "million" and suffixes above [Olivier Brunel]