library number-formatter
Extended PHP NumberFormatter class.
arius/number-formatter
Extended PHP NumberFormatter class.
- Wednesday, November 11, 2015
- by arius86
- Repository
- 1 Watchers
- 10 Stars
- 275 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 2 Forks
- 0 Open issues
- 5 Versions
- 11 % Grown
, (*1)
PHP NumberFormatter extended with additional ordinals not supported by ICU., (*2)
Feel free to add more languages. Fork, pull request and contribute!, (*3)
How to
1. composer.json
{
"require": {
"arius/number-formatter": "1.*"
}
}
2. PHP
Use in code just like NumberFormatter class., (*4)
use Arius\NumberFormatter;
$formatter = new NumberFormatter('pl', NumberFormatter::SPELLOUT);
$formatter->setTextAttribute(NumberFormatter::DEFAULT_RULESET, "%spellout-ordinal");
$formatter->format(123);
Additional supported ordinals
1. Polish (pl)
- spellout-ordinal
- spellout-ordinal-feminine
- spellout-ordinal-masculine
- spellout-ordinal-neuter
2. Russian (ru)
- spellout-ordinal
- spellout-ordinal-feminine
- spellout-ordinal-masculine
- spellout-ordinal-neuter
- spellout-ordinal-plural (plural isn't part of ICU in all languages)
dev-master
9999999-dev
Extended PHP NumberFormatter class.
Sources
Download
MIT
The Requires
The Development Requires
by
Arkadiusz Ostrycharz
v1.1.0
1.1.0.0
Extended PHP NumberFormatter class.
Sources
Download
MIT
The Requires
The Development Requires
by
Arkadiusz Ostrycharz
dev-feature-spellout-ru
dev-feature-spellout-ru
Extended PHP NumberFormatter class.
Sources
Download
MIT
The Requires
The Development Requires
by
Arkadiusz Ostrycharz
v1.0.1
1.0.1.0
Extended PHP NumberFormatter class.
Sources
Download
MIT
The Requires
The Development Requires
by
Arkadiusz Ostrycharz
v1.0.0
1.0.0.0
Extended PHP NumberFormatter class.
Sources
Download
MIT
The Requires
The Development Requires
by
Arkadiusz Ostrycharz