PHP code example of izzle / translation
1. Go to this page and download the library: Download izzle/translation 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/ */
izzle / translation example snippets
use Izzle\Translation\Services\Translation;
// Init and load translation file
$translation = new Translation('paht_to_file.json');
// Translate
// Ex. { "global": { "hello": "Hello {0}" } }"
echo $translation->translate('global.hello', ['World']);