承接 yandex/translate-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yandex/translate-api

最新稳定版本:1.5.2

Composer 安装命令:

composer require yandex/translate-api

包简介

Client for Yandex.Translate API

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Api reference

Versioning

Package version corresponds to the version of the API.

Installation

Add into your composer.json:

{
  "require": {
    "yandex/translate-api": "1.5.x"
  }
}

Usage

Get your own api key

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

MIT

统计信息

  • 总下载量: 2.26M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 132
  • 点击次数: 1
  • 依赖项目数: 15
  • 推荐数: 1

GitHub 信息

  • Stars: 132
  • Watchers: 17
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-04