lingo24/api-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

lingo24/api-client

Composer 安装命令:

composer require lingo24/api-client

包简介

Client library for Lingo24's translation APIs.

关键字:

README 文档

README

We love languages at Lingo24. Every day we work hard to translate documents, websites, tools and products, helping people all over the world communicate with one another.

Translating your content can be challenging, but we aim to make it very simple through easy to use tools, friendly people, and great technology.

In terms of translation, Lingo24 offers a range of professional human-translation and premium machine translation services, all of which can accessed via our translation APIs.

This is a PHP interface to make using our APIs simpler.

Installation & Requirements

Installing the Lingo24 API client is easy using Composer, simply include the library as a dependency in your configuration file:

"require": {
    "lingo24/api-client": "=2.*"
}

Questions, Comments, Complaints, Compliments?

If you have questions or comments and would like to reach us directly, please feel free to do so at the following outlets. We love hearing from developers!

If you come across any issues with the library, please file them on the project’s Bitbucket issue tracker.

Accessing Our Premium Machine Translation API

To get started with the API you first have to authenticate. You do this by using the authentication information you received when you signed up on the Lingo24 Developer Portal.

$lingo24 = new \Lingo24\API\MT('your_user_key')

If you do not have an _userkey please go to our plans page to sign up for one of our access plans. This includes our free Premium Machine Translation Taster plan, with free access to translate 100,000 between English, French and Spanish.

Once you have done this you are free to use the methods exposed via the API wrapper to translate text, fetch source languages and fetch target languages. You can also view the methods available on the online Lingo24 API documentation.

Accessing Our Business Documents API

To get started with the API you must first contact us to create a customer account linked to your Lingo24 Developer Portal account. Authentication with the Business Documents API is performed using OAuth2. To start using API functionality your users will need to authenticate, your application should redirect users to our Ease Client Portal, passing the request type (code), client id and redirect URI as POST parameters. Once authorised the Ease portal will redirect users and provide an authorisation code. The authorisation code can then used to create the library.

$lingo24Docs = new \Lingo24\API\Docs('your_client_id', 'your_client_secret', 'your_application_url', 'authorisation code');

Once you have done this you are free to use the methods exposed via the API wrapper to create and manage jobs and projects. You can view the methods available on the online Lingo24 API documentation.

Project Wizard

The API client library provides a "Project Wizard" as a convenient way of scripting project and job creation. The Wizard allows you to add multiple source files and target locales, then create jobs for each combination.

$lingo24Project = (new \Lingo24\API\ProjectWizard('My Project'))
    ->setDomain($lingo24Domain)
    ->setService($lingo24Service)
    ->setSourceLocale($lingo24SourceLocale)
    ->addFile('/tmp/file1.txt', 'My First File')
    ->addFile('/tmp/file2.txt', 'My Second File')
    ->addTargetLocale($lingo24TargetLocale1)
    ->addTargetLocale($lingo24TargetLocale2)
    ->create($lingo24Docs);

The example above will create a project containing four jobs, once for each of the file / target locale combinations. Once the project has been created it can be used with the Business Documents API library as normal, e.g.

$lingo24Docs->confirmProject($lingo24Project);

统计信息

  • 总下载量: 11.73k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固