<?php
/**
* User: Aleksandar Zivanovic <coapsyfactor@gmail.com>
* Date: 12/27/16
* Time: 3:57 PM
*/
/** Load required class */
require_once __DIR__ . '/iTranslate.php';
/** @var iTranslate $englishTranslate instance of translations for english language */
$englishTranslate = new iTranslate('en');
echo $englishTranslate->formatTranslate('CURRENT_TIME', date('H:i:s', time()), date('l', time())) . "\n";
/** @var iTranslate $germanTranslate instance of translations for german language */
$germanTranslate = new iTranslate('de');
echo $germanTranslate->formatTranslate('CURRENT_TIME', date('H:i:s', time()), date('l', time())) . "\n";
/** @var iTranslate $serbianTranslate instance of translations for serbian language */
$serbianTranslate = new iTranslate('rs');
echo $serbianTranslate->formatTranslate('CURRENT_TIME', date('H:i:s', time()), date('l', time())) . "\n";
/** @var iTranslate $universalTranslate used to demonstrate language change on fly */
$universalTranslate = new iTranslate('en');
echo $universalTranslate->translate('HELLO_WORLD') . "\n";
echo $universalTranslate->setLanguage('de')->translate('HELLO_WORLD') . "\n";
echo $universalTranslate->setLanguage('rs')->translate('HELLO_WORLD') . "\n";
|