1. Go to this page and download the library: Download stolkom/translatable 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/ */
stolkom / translatable example snippets
use Stolkom\Translatable\Translatable;
public $translatableAttributes = ['name', 'description'];
$exampleModel->name // будет переведено, если значение перевода есть в БД
public function getTranslation(string $field, string $locale = null)