2017 © Pedro Peláez
 

symfony-bundle numbers-to-words-bundle

This bundle allows to convert numbers to words

image

celvin/numbers-to-words-bundle

This bundle allows to convert numbers to words

  • Friday, August 26, 2016
  • by celvin
  • Repository
  • 1 Watchers
  • 1 Stars
  • 52 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 13 % Grown

The README.md

NumbersToWordsBundle

This is one improved edition of https://github.com/massil31/NumbersToWordsBundle, (*1)

Hopefully compatible with Symfony 2 and 3, (*2)

Installation:, (*3)

1 First install pear module:

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, (*4)

2 install the bundle:

composer require celvin/numbers-to-words-bundle

2.1 To specify the branch

composer require celvin/numbers-to-words-bundle dev-master

3 Add this to app/AppKernel.php

new celvin\NumbersToWordsBundle\celvinNumbersToWordsBundle(),

4 Add use to your controller:

use celvin\NumbersToWordsBundle\Numbers_Words\Numbers\Words;

5 Try it

$numbers_words = new Words();
$word = $numbers_words->toWords("12378" /**Number**/, 'es'/**locale**/);

5.1 Money

Convert money ammount, (*5)

<?php // In Controller $numbers_words = new Word();, (*6)

$word = $numbers_words->toCurrency('123,56'/**Ammount**/, 'en'/**Locale**/, 'EUR'/**Currency**/, ','/**Decimal Point**/);

// Output : cent vingt-trois euros cinquante-six centimes
// Available locales : fr, en, es

The Versions

26/08 2016

dev-master

9999999-dev

This bundle allows to convert numbers to words

  Sources   Download

MIT

The Requires

 

by Massil Korichi

symfony2 translate numbers words