PHP code example of scoobydam / php-translator
1. Go to this page and download the library: Download scoobydam/php-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/ */
scoobydam / php-translator example snippets
use ScoobyTranslator\Translator\Translator;
$translator = new Translator(__DIR__ . '/translations', 'fr');
$translator->translate('key_to_translate');
// __DIR__/translations/fr.php
$translations = [
'general' => [
'key' => 'value',
],
];
bash
composer