https://github.com/byjg/php-wordnumber
Write float number in a word number.
https://github.com/byjg/php-wordnumber
language numbers numbers-to-text php
Last synced: 6 months ago
JSON representation
Write float number in a word number.
- Host: GitHub
- URL: https://github.com/byjg/php-wordnumber
- Owner: byjg
- License: gpl-3.0
- Created: 2015-04-21T14:43:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T22:30:08.000Z (11 months ago)
- Last Synced: 2025-03-29T17:13:11.055Z (6 months ago)
- Topics: language, numbers, numbers-to-text, php
- Language: PHP
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Wordnumber
[](https://github.com/byjg/php-wordnumber/actions/workflows/phpunit.yml)
[](http://opensource.byjg.com)
[](https://github.com/byjg/php-wordnumber/)
[](https://opensource.byjg.com/opensource/licensing.html)
[](https://github.com/byjg/php-wordnumber/releases/)Write float number in a word number.
Support multiple languages. Until this moment supports
- English
- Portuguese
- Italian (Thanks to [willypuzzle](https://github.com/willypuzzle))# Examples
```php
$wordNumber = new ByJG\WordNumber\EnglishWordNumber();
$wordnumber->write(12.34); # writes twelve dollars and third four cents
```or
```php
$wordNumber = new ByJG\WordNumber\PortugueseWordNumber();
$wordnumber->write(12.34); # writes doze reais e trinta e quatro centavos.
```# Create other languages
You have to implement the interface WordNumberInterface with the proper word number in your language.
If you create feel free to send to us.```php
interface WordNumberInterface
{
public function concatWord();public function currency();
public function tens();
public function unit();
public function elevenToNineteen();
public function twentyToNinety();
public function hundreds();
public function oneHundred();
}
```## Dependencies
```mermaid
flowchart TD
byjg/wordnumber
```----
[Open source ByJG](http://opensource.byjg.com)