bartfeenstra / cldr

A PHP library to parse Unicode CLDR number patterns
MIT License
5 stars 1 forks source link

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. Unlike PHP's Intl 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

Integrates with