php-extended/php-locale-object

A library that implements the php-extended/php-locale-interface package

6.0.6 2024-03-25 12:46 UTC

README

A library that implements the php-extended/php-locale-interface package.

coverage build status

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.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar php-extended/php-locale-object ^6

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).