This is one improved edition of https://github.com/massil31/NumbersToWordsBundle
Hopefully compatible with Symfony 2 and 3
Installation:
pear install Numbers_Words
If there are some trubles about the version you can use: pear install channel://pear.php.net/Numbers_Words-0.18.1
composer require celvin/numbers-to-words-bundle
composer require celvin/numbers-to-words-bundle dev-master
new celvin\NumbersToWordsBundle\celvinNumbersToWordsBundle(),
use celvin\NumbersToWordsBundle\Numbers_Words\Numbers\Words;
$numbers_words = new Words();
$word = $numbers_words->toWords("12378" /**Number**/, 'es'/**locale**/);
Convert money ammount
toCurrency('123,56'/**Ammount**/, 'en'/**Locale**/, 'EUR'/**Currency**/, ','/**Decimal Point**/); // Output : cent vingt-trois euros cinquante-six centimes // Available locales : fr, en, es