Nette Translator library for loading translates from copycopter.
- Nette Framework 2.0.7 or higher. (PHP 5.3 edition)
- Kdyby/Curl - Curl wrapper for Nette Framework.
Place class into libs dir. To load translator we recommend implement class initialization into config.neon and load as context variable into templates.
common:
parameters:
copycopterApiKey: yourApiKey
services:
translator: Translator(%copycopterApiKey%)
In BasePresenter.php:
startup(){
$this->template->setTranslator($this->context->translator);
}
In PHP:
t('string to translate')
Ondrej Podolinský, 2013, Ataxo Interactive a.s.
LGPL