yandex/translate-api
Client for Yandex.Translate API
Maintainers
1.5.2
2015-07-27 15:00 UTC
Requires
- php: >=5.3
- ext-curl: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT c99e69cde3e688fc0f99c4d8a21585226a8e1938
- Nikita Gusakov <dev.woop@nkt.me>
This package is not auto-updated.
Last update: 2026-06-08 12:27:19 UTC
README
π Latest Stable Version
π Total Downloads
π Latest Unstable Version
π License
Versioning
Package version corresponds to the version of the API.
Installation
Add into your composer.json:
{
"require": {
"yandex/translate-api": "1.5.x"
}
}
Usage
use Yandex\Translate\Translator; use Yandex\Translate\Exception; try { $translator = new Translator($key); $translation = $translator->translate('Hello world', 'en-ru'); echo $translation; // ΠΡΠΈΠ²Π΅Ρ ΠΌΠΈΡ echo $translation->getSource(); // Hello world; echo $translation->getSourceLanguage(); // en echo $translation->getResultLanguage(); // ru } catch (Exception $e) { // handle exception }
