Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

mreg-archive/localefacade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: The symfony Locale component is deprecated since symfony 2.3, use the Intl component instead. LocaleFacade will not be updated as it is not necessary when using Intl.

For more information see the Intl documentation.

LocaleFacade [deprecated]

OO wrapper to symfony/locale (and the Locale class of the Intl extension)

Installation

Install using composer

composer require ledgr/localefacade

Usage

use ledgr\localefacade\LocaleFacade;

$l = new LocaleFacade('de');

// Prints 'Deutsch'
echo $l->getDisplayName();

// Prints 'Schweden'
echo $l->getDisplayCountries()['SE'];

$arr = array(
    'ü',
    'u',
    'ß',
    's'
);
$l->createCollator()->sort($arr);

// Prints 's, ß, u, ü'
print_r($arr);

// And all the other Locale methods...

Testing

To run the tests you must first install dependencies using composer.

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
$ phpunit

About

[Deprecated] OO wrapper to symfony/locale

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages