Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unreal4u/localization
A class that sets a lot of locale settings
https://github.com/unreal4u/localization
Last synced: about 2 months ago
JSON representation
A class that sets a lot of locale settings
- Host: GitHub
- URL: https://github.com/unreal4u/localization
- Owner: unreal4u
- Created: 2013-09-23T22:19:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-03T08:49:44.000Z (almost 8 years ago)
- Last Synced: 2024-10-12T05:09:20.842Z (3 months ago)
- Language: PHP
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Latest Stable Version](https://poser.pugx.org/unreal4u/localization/v/stable.png)](https://packagist.org/packages/unreal4u/localization)
[![Build Status](https://travis-ci.org/unreal4u/localization.png?branch=master)](https://travis-ci.org/unreal4u/localization)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/unreal4u/localization/badges/quality-score.png?s=5f6fa877aaa981d9a4e43aec068334c667c32815)](https://scrutinizer-ci.com/g/unreal4u/localization/)
[![License](https://poser.pugx.org/unreal4u/localization/license.png)](https://packagist.org/packages/unreal4u/localization)localization.class.php
======Credits
--------This class is made by unreal4u (Camilo Sperberg). [http://unreal4u.com/](unreal4u.com).
About this class
--------* This class will interact with the server to set locale settings
* It is able to autodetect from the browser which locale you can setup
* You can also set it to whatever locale you want
* It will also format numbers and currencies for you
* It will also format dates and times
* It also is able to work with timezonesBasic usage
----------include('src/unreal4u/localization.class.php');
$locale = new unreal4u\localization();
$locale->autodetectLocale();
$locale->formatNumber(3.1415);* Congratulations! You have just printed 3.1415 formatted according to your browser locale settings!
* **Please see documentation folder for more options and advanced usage**Composer
----------This class has support for Composer install. Just add the following section to your composer.json with:
{
"require": {
"unreal4u/localization": "0.3.*@dev"
}
}Now you can instantiate a new localization class by executing:
require('vendor/autoload.php');$localization = new unreal4u\localization();
TODO list
----------* Pass PHP_CodeSniffer
* Implement more tests
* Print percentage
* Print other stuff, make it easy to do soVersion History
----------* 0.1 :
* Original class
* 0.3 :
* Composer and PSR-0 compatibility
* 0.4.0:
* Deleted check for inline PHP >= 5.3
* Class is now tested with Travis-CI
* Updated PHPUnit to v4.0
* Deleted method formatSimpleNumber and formatSimpleCurrency in favor of formatNumberContact the author
-------* Twitter: [@unreal4u](http://twitter.com/unreal4u)
* Website: [http://unreal4u.com/](http://unreal4u.com/)
* Github: [http://www.github.com/unreal4u](http://www.github.com/unreal4u)