![]() |
Xataface Translation Memory Module 0.1
Translation Memory for Xataface Applications
|
Handler for the tm_add_translations
action which provides a REST API to add translations to the translation memory.
More...
Public Member Functions | |
handle ($params) | |
out ($params) |
Handler for the tm_add_translations
action which provides a REST API to add translations to the translation memory.
Name | Description |
---|---|
--source | The 2-digit ISO code of the source language. |
--dest | The 2-digit ISO code of the destination language. |
--strings | An array of source strings. |
--translations | An array of translated strings. Indices should correspond to the indices of the --strings parameter. |
This action will return mimetype text/json with a JSON object of the following structure:
{ code: <int>, // The response code. 200 for success. message: <string>, // The response message. Error or success. saved: <array>, // Array of strings that were successfully saved. outTranslations: <object> // Maps input strings to their translations (only for ones // that were successfully saved. }
This action requires that the user has the "tm:add translation"
permission for the translation memory to which the strings are being added.
Definition at line 60 of file tm_add_translations.php.
handle | ( | $ | params | ) |
Definition at line 62 of file tm_add_translations.php.
out | ( | $ | params | ) |
Definition at line 147 of file tm_add_translations.php.