php-extended/php-locale-object

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

7.0.7 2024-07-31 13:38 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 ^7

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