yandextranslator / yandextranslator
is based on the Yandex interpreter. Uses the guzzlle library
Installs: 8
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/yandextranslator/yandextranslator
Requires
This package is not auto-updated.
Last update: 2025-10-01 09:06:36 UTC
README
is based on the Yandex interpreter. Uses the guzzlle library
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yandextranslator/yandextranslator "*"
or add
"yandextranslator/yandextranslator": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?php use dastanaron\extension\yandextranslator\Translator; $api_key = 'you yandex api key'; $text = "Привет мир"; $translator = new Translator($api_key, $text); $translate = $translator->translate(); echo $translate->getJson(); var_dump($translate->getArray()); echo $translate->etTranslateText(); echo $translate->getTranslatedToUrl();