1. Go to this page and download the library: Download romeoz/rock-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/ */
romeoz / rock-i18n example snippets
use rock\i18n\i18n;
$i18n = new i18n;
$i18n->add('hello', 'Hello {{placeholder}}');
$i18n->translate('hello', ['placeholder' => 'world!']); // output: Hello world!
// or
i18n::t('hello', ['placeholder' => 'Rock!']); // output: Hello Rock!