yandex/translate-api
最新稳定版本:1.5.2
Composer 安装命令:
composer require yandex/translate-api
包简介
Client for Yandex.Translate API
README 文档
README
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 }
License
统计信息
- 总下载量: 2.26M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 132
- 点击次数: 1
- 依赖项目数: 15
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-04