fordev / literalnumbers
Change numeric amounts to literal
dev-master
2016-03-04 10:15 UTC
This package is not auto-updated.
Last update: 2026-03-07 02:00:26 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