PHP code example of elcheco / translator
1. Go to this page and download the library: Download elcheco/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/ */
elcheco / translator example snippets
namespace App;
r\Translator;
use ElCheco\Translator\NeonDictionary\NeonDictionaryFactory;
// both translations and cache are in the same directory
$translator = new Translator(new NeonDictionaryFactory(__DIR__, __DIR__));
$translator->setLocale('cs_CZ');
$translator->translate('Welcome!');