stajor/yandex-translate
Composer 安装命令:
composer require stajor/yandex-translate
包简介
PHP Yandex Translate API
README 文档
README
PHP library for Yandex Translate API.
Installation
Via Composer:
composer require stajor/yandex-translate
Usage
Getting a list of supported languages
<?php $translateClient = new Yandex\Translate\TranslateClient('YANDEX-TARNSLATE-TOKEN'); $response = $translateClient->getLangs('en');
Language detection
<?php $translateClient = new Yandex\Translate\TranslateClient('YANDEX-TARNSLATE-TOKEN'); $response = $translateClient->detect('Hello world!');
Text translation
<?php $translateClient = new Yandex\Translate\TranslateClient('YANDEX-TARNSLATE-TOKEN'); $response = $translateClient->translate('Hello world!', 'ru');
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Stajor/yandex-translate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-17