Skip to content

About

A helper for converting numbers into words

Resources

Stars

2 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#NumbersToWordsHelper A helper for CakePHP3 to convert numbers into words.

Have you ever wanted to use a number as a css class? Or title items in a loop, but number just look messy? I have, and so I made this quick plugin to solve that problem.

##Installation You can find the plugin listed on Packagist.
https://packagist.org/packages/davidyell/numbers_to_words

You can use this to require it into your CakePHP 3 project by adding it to your composer.json file.

##Configuration You need to load the plugin in your config/bootstrap.php Plugin::load('NumbersToWords');

You'll need to add it to your controllers helpers array and configure your locale.

public $helpers = [
	'NumbersToWords.NumbersToWords' => [
		'locale' => 'en_GB'
	]
];

##Usage

<?= $this->NumbersToWords->spell(5); // 'five';?>

##Contribution If you would like to add more conversions, please fork and submit a pull request.

##License See LICENSE

About

A helper for converting numbers into words

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages