ataxo / copycopter-php-client
Nette Translator library for loading translates from copycopter.
dev-master
2013-06-09 17:48 UTC
Requires
- php: >= 5.3.0
- kdyby/curl: dev-master
- nette/nette: >= 2.0.0
This package is not auto-updated.
Last update: 2025-03-01 16:46:30 UTC
README
Nette Translator library for loading translates from copycopter.
Requirements
- Nette Framework 2.0.7 or higher. (PHP 5.3 edition)
- Kdyby/Curl - Curl wrapper for Nette Framework.
Usage
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')
Copyright
Ondrej Podolinský, 2013, Ataxo Interactive a.s.
License
LGPL