1. Go to this page and download the library: Download slexx/lang 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/ */
slexx / lang example snippets
// Устанавливаем файлы с переводами
Lang::setFile('ru', 'messages', __DIR__ . '/locales/ru/messages.json');
Lang::setFile('en', 'messages', __DIR__ . '/locales/en/messages.yaml');
// Устанавливаем локализацию
Lang::setLocale(Lang::searchLocale('ru'));
// Добываем переводы в нужных местах
Lang::translate('messages:key');