Class Yandex Translate

Автор: | Октябрь 12, 2016

In the context of developing multi-lingual pages was the question of automatic translation of texts, products, or other texts.
It turned out the interpreter class which uses the API yandex 1.5.

Access to all API methods is the key.
Get your free API key you need the link
The key is to write in the file Yandex_Translate in the line

PHP code:
# Your API key for Yandex. Get here:
protected $key = ‘Your API key for Yandex’
In the file text.txt is a demo text and the file text_big large text.
Large texts will be translated into fragments and then collected into one text.
It is possible to obtain a list of translation directions using getLangs.
Separately it is possible to obtain lists from any language to translate and into what language to translate.
As well as a list of language code name of language.
Can someone come in handy , to save time .
To demo place the trans folder in the root of the local domain, and in the file index.php specify the path to the text files demo


Note; This is for developer. YOU can use at your discretion.