1. Go to this page and download the library: Download borges/localization library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
App::setLocale('en');
echo Lang::get('app.welcome'); # prints 'Welcome'
echo Lang::get('app.color'); # prints 'Colour'
echo Lang::get('app.hello'); # prints 'Hello'
App::setLocale('en-US');
echo Lang::get('app.welcome'); # prints 'Welcome'
echo Lang::get('app.color'); # prints 'Color'
echo Lang::get('app.hello'); # prints 'Hello'
App::setLocale('pt');
echo Lang::get('app.welcome'); # prints 'Bem-vindo'
echo Lang::get('app.color'); # prints 'Cor'
echo Lang::get('app.hello'); # prints 'Olá'
echo Lang::get('another-string'); # prints 'Another String' if 'useDefault' is true or else prints 'another-string'
App::setLocale('en');
echo Locale::number(1234567.890); # prints '1, 234, 567.89'
echo Locale::int(1234567.890); # prints '1, 234, 568'
echo Locale::date(Carbon\Carbon::now()); # prints 'Tuesday, December 17, 2013'
App::setLocale('en-US');
echo Locale::number(1234567.890); # prints '1, 234, 567.89'
echo Locale::int(1234567.890); # prints '1, 234, 568'
echo Locale::date(Carbon\Carbon::now()); # prints 'Tuesday, December 17, 2013'
App::setLocale('pt');
echo Locale::number(1234567.890); # prints '1 234 567,89'
echo Locale::int(1234567.890); # prints '1 234 568'
echo Locale::date(Carbon\Carbon::now()); # prints '17 de Dezembro de 2013'
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.