Difference between revisions of "REST API:translationWorkbench Resource"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric m (Text replace - 'http://{domain}' to 'https://{domain}') |
||
Line 19: | Line 19: | ||
;Response: | ;Response: | ||
:This sample response comes in reply to the request, <tt><nowiki> | :This sample response comes in reply to the request, <tt><nowiki>https://{domain}/networking/rest/translationWorkBench/customlabel/validation.record_deleted?args=5</nowiki></tt>, when the user's language is Spanish. | ||
:<syntaxhighlight lang="xml" enclose="div"> | :<syntaxhighlight lang="xml" enclose="div"> | ||
<platform> | <platform> |
Revision as of 19:19, 30 March 2012
Get translated strings using the REST API.
- Learn more: REST API Conventions and Considerations.
Requirements
- Translations have been created in the Translation Workbench
Get a Translation for a Custom Label
- Method
- GET
- URI
- https://{domain}/networking/rest/translationWorkBench/customlabel/{key}
- https://{domain}/networking/rest/translationWorkBench/customlabel/{key}?args=param1,...
- where:
- {key} - The index value used to look up a translated string, in the form {category}.{token_id}
- Query Parameters
- args - A list of one or more arguments that will be interpolated into the string at the locations assigned to them when the base string was created.
- For more information, see: Specifying Query Parameters in REST APIs
- Response
- This sample response comes in reply to the request, https://{domain}/networking/rest/translationWorkBench/customlabel/validation.record_deleted?args=5, when the user's language is Spanish.
<platform> <translationWorkBench> <key>validation.record_deleted</key> <translatedText>5 registros eliminados con éxito</translatedText> </translationWorkBench> <message> <code>0</code> <description>Success</description> </message> </platform>
- See also: REST API:Error Codes
Fields
Name Type Description key String The ID of the translated element, in the form {category}.{token_id}. For example: validation.record_deleted translatedText String The translation for the key, in the current user's language, with any arguments in the request interpolated into the string.