Skip to content

The WritePath PHP Translation API gives you quick access to premium translators, is easy to understand and integrate and an efficient way to automate your translation and localization needs.

Notifications You must be signed in to change notification settings

WritePath/PHP-Translation-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

WritePath Translation API (PHP)

With the WritePath Translation API and Proofreading API, developers can easily access a large number of experienced translators & editors with industry expertise in more than 35 languages. This API offers an easy an efficient way to integrate translation into your backend system, user interface, document management system, web shop, website content management system (CMS), mobile app, etc. It helps to automate repeating processes, cuts down process costs and gives you more time to focus on your core business.

For details check the PHP translation API documentation. It takes care of authorization, JSON encoding and decoding and it can do a few more very convenient things.

New: A Java client is available upon request, also see the Java translation API repository.

Getting started:

Sign up at writepath.co and request your API keys.

Methods:

  • Get word count of plain text (POST)
  • Get word count of document (POST)
  • Post a job with plain text (POST)
  • Post a job with document (POST)
  • Fetch job status (POST)
  • Fetch current word balance of your account (POST)
  • Post a comment (POST)
  • Post multiple jobs with plain text (POST)
  • Fetch multiple job status (jobs posted by above) (POST)

A list of supported languages and categories is available here.

Callbacks:

Callbacks are automatic notifications which are sent to your notification URL (which you specify with your post job or post plain text method). Callbacks are available for the following events:

  • When a job has been finished
  • When translator or editor sends a comment

Example:

Include the file WritePathClient.php, set your API keys and call the respective method:

include 'WritePathClient.php';

$api_key = '12345678';
$private_key = 'ABCDEFGH';

$service = '2'; // i.e. Standard Translation
$langID = '5'; // i.e. English - Chinese (Simplified)
$text = 'My very long text';

$WritePathClient = new WritePathClient($api_key, $private_key);
$reply = $WritePathClient->getWordCountPlainText($service, $langID, $text);

We use JSON. Every response looks like this:

{
  "response": {

  },
  "opStatus": "ok"
}

If something has gone wrong, the response looks like this:

{
  "response": {
    "errorCode": "4001",
    "errorMessage": "Something has gone wrong"
  },
  "opStatus": "error"
}

Detailed documentation for all methods and callbacks is available here.

About

The WritePath PHP Translation API gives you quick access to premium translators, is easy to understand and integrate and an efficient way to automate your translation and localization needs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages