With the WritePath Translation API and Proofreading API, developers can easily access over 10.000 translators & editors and more than 120 different language pairs and integrate into their own system on demand. 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 translation API client is available upon request
Sign up at writepath.co and request your API keys.- 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)
A list of supported languages and categories is available here.
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
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.