dev-master
9999999-devA symfony2 bundle help you to translate using Yandex API
MIT
The Requires
by Krishna Ghodke
yandextranslationbundle
A symfony2 bundle help you to translate using Yandex API
A package designed for string translation utilizing the Yandex API. Presently, it exclusively accommodates Yandex translation services. Integration with the Google Translation API is slated for future implementation., (*1)
To use this bundle in your Symfony2 project add the following to your composer.json
:, (*2)
{ "require": { // ... "krushnaghodke/translation-bundle": "dev-master" } }
Then, you can install the new dependencies by running Composer's update
command from the directory
where your composer.json
file is located:, (*3)
.. code-block :: bash, (*4)
$ php composer.phar install
Now, Composer will automatically download all required files, and install them for you.
All that is left to do is to update your AppKernel.php
file, and register the new bundle:, (*5)
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Krushnaghodke\TranslationBundle\KrushnaghodkeTranslationBundle(), ); }
Update following code in config.yml., (*6)
# app/config.yml krushnaghodke_translation: api_key: %yandex_api_key%
Below is a brief demonstration illustrating the process of translating your initial string using the Yandex API. It is presumed that the configuration has been appropriately established:, (*7)
<?php $translation = $this->get('krushnaghodke.translation.manager'); $result = $translation->translate("This is testing string", 'en-hi');
A symfony2 bundle help you to translate using Yandex API
MIT
yandextranslationbundle