chiarillomax / yandex-translator-bundle
Yandex translator integration in Symfony2
Package info
github.com/massimo-me/YandexTranslatorBundle
Type:symfony-bundle
pkg:composer/chiarillomax/yandex-translator-bundle
V1.2
2016-04-20 13:25 UTC
Requires
- guzzle/guzzle: ^3.9
- symfony/framework-bundle: ~2.3
Requires (Dev)
- phpunit/phpunit: ^4.7
This package is not auto-updated.
Last update: 2026-03-12 06:19:47 UTC
README
Use Yandex translator service in your Symfony Project
Installation
Install the bundle:
composer require chiarillomax/yandex-translator-bundle
Register the bundle in app/AppKernel.php:
<?php // app/AppKernel.php public function registerBundles() { return array( // ... new \Yandex\TranslatorBundle\YandexTranslatorBundle() ); }
Usage
//use Yandex\TranslatorBundle\Model\Key $key = new Key(); $key->setValue('YourKey'); $request = $this->get('yandex.translator')->createRequest() ->setKey($key->getValue()) ->setText('Hello Max') ->setFrom('en') ->setTo('it') ->send(); $text = $request->getText(); //Ciao Max
Test
phpunit