1. Go to this page and download the library: Download rancoud/i18n 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/ */
I18N::echo('Hello');
// it will produce in output 'Hello'
I18N::echo('another string');
// it will produce in output 'another string' because the key doesn't exist in the file
$string = I18N::get('Hello');
// it will return 'Hello'
// you can use different language file instead of the default one
$string = I18N::get('string in other lang', 'es');
// it will return the translation of 'string in other lang' present in the es.php file
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.