Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 38 | All time: 10,933 This week: 206 |
Version | License | PHP version | Categories | |||
cldr 1.0.0 | MIT/X Consortium ... | 5 | Localization, PHP 5, Text processing |
Description | Author | |
This package can retrieve locale details from Unicode CLDR files. |
[[ Work in progress ]]
I will put more example and documentation.
at very basic, you may use something like this:
$locale = \Locale::getDefault();
$mainProvider = new \Poirot\Cldr\DataProvider\MainProvider($locale);
echo $mainProvider->getCharacterOrder(); // right-to-left
/*
array(3) {
["metric"]=>
string(10) "?????"
["UK"]=>
string(20) "??????????"
["US"]=>
string(16) "????????"
}
*/
$mn = $mainProvider->getMeasurementSystemNames();
$mainProvider->setLocale('en');
echo $mainProvider->getTerritoryName('IR'); // Iran
/Use custom data path/
// Iran
echo $mainProvider->getRepoReader()
->getEntityByPath(
'localeDisplayNames/territories/territory',
array('type' => 'IR')
);
To report bugs or request features, please visit the Issue Tracker.
Please feel free to contribute with new issues, requests and code fixes or new features.
Files (11) |
File | Role | Description | ||
---|---|---|---|---|
Poirot (1 directory) | ||||
repoLdml (1 file) | ||||
composer.json | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (11) | / | Poirot | / | Cldr |
File | Role | Description | ||
---|---|---|---|---|
DataProvider (3 files) | ||||
RepoBrowser (2 files) | ||||
RepoReader (2 files) | ||||
LocaleData.php | Class | Class source |
Files (11) | / | Poirot | / | Cldr | / | DataProvider |
File | Role | Description |
---|---|---|
MainProvider.php | Class | Class source |
ProviderAbstract.php | Class | Class source |
ProviderInterface.php | Class | Class source |
Files (11) | / | Poirot | / | Cldr | / | RepoBrowser |
File | Role | Description |
---|---|---|
BrowserInterface.php | Class | Class source |
LDMLRepo.php | Class | Class source |
Files (11) | / | Poirot | / | Cldr | / | RepoReader |
File | Role | Description |
---|---|---|
LDMLReader.php | Class | Class source |
ReaderInterface.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.