TermBase Translation API

The TermBase Translation API is composed of 3 endpoints:

List Term Translations

This endpoint is only accessible by the private API key and is used to list translations for a term.

/api/projects/:project_token/terms/:term_id/locales/:locale_code/translations.format [GET]

Where format is one of xml, json or yaml. Note that you can get a JSONP response by adding a ?callback=yourFunctionName parameter to the json API call.

Example response with JSON:

  • text: The actual term translation.
  • description: Term translation description
  • status: Term Translation status. One of approved, refused, proposed.

Example Implementation in Ruby

Example Implementation in PHP

Create Term Translation

This endpoint is only accessible by the private API key and is used to create a new term translation.

/api/projects/:project_token/terms/:term_id/locales/:locale_code/translations [POST]

Parameters

A JSON object modelled after the following:

description and status are optional.

status can be one of approved, proposed or refused.

If everything goes Well, WebTranslateIt will respond with 201 Created in the header and a JSON representation of the string just created in the body.

Example Implementation in Ruby

Example Implementation in PHP

Update Term Translation

This endpoint is only accessible by the private API key and is used to update a term translation.

/api/projects/:project_token/terms/:term_id/locales/:locale_code/translations/:term_translation_id [PUT]

Parameters

A JSON object modelled after the following:

description and status are optional.

status can be one of approved, proposed or refused.

If everything goes Well, WebTranslateIt will respond with 202 Accepted in the header and a JSON representation of the string just created in the body.

Example Implementation in Ruby

Example Implementation in PHP