1. Go to this page and download the library: Download carrooi/translator 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/ */
$message = $translator->translate('dictionary.info', null, array( // output: display some random variable: 2 books
'something' => '2 books'
));
$message = $translator->translate('dictionary.info', array( // output: display some random variable: 2 books
'something' => '2 books'
));
$translator->addFilter(function($message) {
return strrev($message);
});
var_dump($translator->translate('homepage.title')); // output is reversed title in homepage dictionary