Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bartfeenstra/cldr
A PHP library to parse Unicode CLDR number patterns
https://github.com/bartfeenstra/cldr
Last synced: 2 months ago
JSON representation
A PHP library to parse Unicode CLDR number patterns
- Host: GitHub
- URL: https://github.com/bartfeenstra/cldr
- Owner: bartfeenstra
- License: mit
- Created: 2012-11-30T12:53:41.000Z (about 12 years ago)
- Default Branch: 1.x
- Last Pushed: 2015-08-29T15:23:04.000Z (over 9 years ago)
- Last Synced: 2024-04-18T16:38:53.585Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 164 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
CLDR
====# Introduction
BartFeenstra/cldr is a PHP library to parse decimals, currency amounts,
percentages, and even integers using [Unicode Common Locale Data Repository
number patterns](http://cldr.unicode.org/translation/number-patterns). Unlike
PHP's [Intl](http://nl1.php.net/manual/en/book.intl.php) extension, this
library allows CLDR patterns to contain non-standard characters (such as HTML)
and it does not have dependencies, which is ideal for shared hosting.# Usage
It offers four classes (`CurrencyFormatter`, `DecimalFormatter`,
`IntegerFormatter`, and `PercentageFormatter`) which accept a CLDR pattern and
optional replacements for replaceable special symbols, and can be reused to
format different numbers.# Requirements
* PHP 5.3.x or higher
* PHPUnit 3.7.* (for running tests only)# Integrates with
* [Composer](http://getcomposer.org) (as
[bartfeenstra/cldr](https://packagist.org/packages/bartfeenstra/cldr))