Created
May 6, 2019 06:49
-
-
Save ShanikaNishadhi/bd81dee2014ebc1e3be656fd2dac1f75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include __DIR__ . '/../vendor/autoload.php'; | |
$lang = isset($_GET['lang']) ? $_GET['lang'] : 'en'; | |
/** @var Zend\I18n\Translator\Translator $translator */ | |
$translator = include __DIR__ . '/../src/translator.php'; | |
$translator->setLocale($lang); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<p><?php echo $translator->translate('Hello my friend'); ?></p> | |
<p><?php echo $translator->translate('How are you?'); ?></p> | |
<p><?php echo $translator->translate('My name is Adam Crik'); ?></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment