php-extended / php-locale-object
A library that implements the php-extended/php-locale-interface package
9.0.7
2026-05-20 00:43 UTC
Requires
- php: >=8.2
- ext-intl: *
- php-extended/php-locale-interface: ^9
Requires (Dev)
This package is auto-updated.
Last update: 2026-06-19 22:54:06 UTC
README
A library that implements the php-extended/php-locale-interface package.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.pharfrom their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/php-locale-object ^9
Basic Usage
This library may be used the following way :
use PhpExtended\Locale\Locale;
$default = Locale::getDefault();
$fr = new Locale('fr_FR');
$en = new Locale('en_US');
$ch = new Locale('zh-Hant-TW');
$fr->equals($en); // false
$fr->toAcceptHttpHeader(); // fr-FR
License
MIT (See license file).