Download the PHP package phil/number-words without Composer

On this page you can find all versions of the php package phil/number-words. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package number-words

phil/number-words

Numbers in words, in any language ICU spells: cardinals, ordinals, gender and amounts of money, corrected where ICU differs from usage.

phil/number-words is a typed facade over the spelling rules of ICU (NumberFormatter::SPELLOUT of ext-intl). It says a cardinal on its own (« vingt et un », « eins ») or agreeing with the gender of a noun (« vingt et une », « veintiún », « ein »), an ordinal in its gender and number (« premières »), and an amount of money in words with its units and sub-units (« cent vingt dollars et cinq cents »), for a cheque, a certificate, a contract or a text read aloud.

ICU knows the numbers of dozens of languages; for French, English, Spanish, German, Italian and Portuguese the library adds what ICU leaves out or gets wrong: the plural of cents and quatre-vingts before millions, French hyphenation in the traditional spelling or in the 1990 rectifications, the soft hyphens ICU puts inside long words, the partitive after million (« un million d'euros », « un millón de dólares »), the singular of zero in French, and the names of common currencies. Nothing falls back in silence: a locale ICU does not spell, a gender or a form the language lacks, a number too large for words, each throws an exception that says so.

It is a plain PHP library built on ext-intl.

Status

Part State
Cardinals, counting and agreeing with a gender; ordinals, gendered and plural Implemented and tested
Amounts of money in words, units and sub-units, for ten currencies in six languages, or names passed in Implemented and tested
French corrections: plurals before large nouns, traditional or 1990 hyphenation, elision of de Implemented and tested
Partitives in Spanish, Italian and Portuguese, soft hyphens, verbose English Implemented and tested
Exceptions for a missing extension, locale, rule set, currency, or a number out of range Implemented and tested

Documentation

Document What it covers
Installation Requirements and installing.
Spelling numbers Cardinals, ordinals, amounts, options, and what each language corrects.
Extension points What an application may replace or add, and when it is stable.
Testing The package's tests and its mutation bar.
Reference Every public type, with its role.

Quick start

Requirements

PHP 8.5 or later, with ext-intl.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of number-words with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-intl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phil/number-words contains the following files

Loading the files please wait ...