fordev / literalnumbers
Change numeric amounts to literal
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/fordev/literalnumbers
This package is not auto-updated.
Last update: 2025-10-04 00:02:10 UTC
README
This package changes numeric amounts to literal representative and supports multilingual apps.
Designed for Polish grammar but can work with others.
Usage
$ln = LiteralNumbers::getInstance(App::getLocale()); echo $ln->toLiteral(4558);
Outputs:
Four thousand five hundred fifty eight
Currencies
If you want to add literal currency use setCurrency()
and currency(true)
:
$ln->setCurrency('usd')->currency(true); echo $ln->toLiteral(14);
Outputs:
Fourteen United States dollars