Xataface Translation Memory Module 0.1
Translation Memory for Xataface Applications
Public Member Functions
actions_tm_add_translations Class Reference

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)

Detailed Description

Handler for the tm_add_translations action which provides a REST API to add translations to the translation memory.

Request Parameters

NameDescription
--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.

Response Structure

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.
 }

Permissions

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.


Member Function Documentation

handle ( params)

Definition at line 62 of file tm_add_translations.php.

out ( params)

Definition at line 147 of file tm_add_translations.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables