kwn/number-to-words
Convert numbers and currency amounts to words in PHP. Supports multiple languages via RFC 3066 identifiers, with number and currency transformers. Simple API: create transformers or use static calls to render values like 5120 as “five thousand one hundred twenty”.
Localization & Globalization (i18n) Features:
Compliance & UX Improvements:
Roadmap Prioritization:
en, es, fr) for MVP, then expand to regional languages (e.g., hu, pt_BR, de, ar) as part of a globalization initiative. The Hungarian fix validates the package’s suitability for Central/Eastern European markets.Use Cases:
Adopt When:
hu_HU for Hungarian forints).Look Elsewhere When:
*"This updated PHP library now includes a fixed Hungarian implementation, making it the ideal solution for our global product’s number-to-words needs—especially if we’re expanding into Central/Eastern Europe. For example, Hungarian invoices will now correctly display amounts like ‘ötven dollár kilencvenkilenc cent’ instead of broken translations. This is a low-cost, high-impact upgrade that:
hu_HU to your supported locales via Composer.
The MIT license and active development (30+ languages, 400+ stars, and now Hungarian support) make it a safe, future-proof choice. Let’s pilot it in our next invoice redesign for Hungarian markets to demonstrate its value."**"This is a drop-in solution for number-to-words conversion in Laravel/PHP, now with a verified Hungarian (hu) implementation. Key improvements in 3.0.1:
101 → "százegy" instead of broken output).1234 → "egy ezer kétszázharmincnégy" in Hungarian.5099 + HUF → "ötven dollár kilencvenkilenc fillér" (Hungarian forints).
Integration:$transformer = (new NumberToWords())->getNumberTransformer('hu');
echo $transformer->toWords(101); // "százegy"
Risks: None critical—PHP 7.4+ only, and the Hungarian fix is a net positive. Let’s use it for [Feature X] to replace manual translations and reduce tech debt."*
*"This library now ensures numbers are displayed correctly in Hungarian, which is critical for:
How can I help you explore Laravel packages today?