Difference between revisions of "REST API:translationWorkbench Resource"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 13: | Line 13: | ||
:<tt><nowiki>https://{domain}/networking/rest/translationWorkBench/{elem}/{key}?args=param1,...</nowiki></tt> Β | :<tt><nowiki>https://{domain}/networking/rest/translationWorkBench/{elem}/{key}?args=param1,...</nowiki></tt> Β | ||
where: | where: | ||
::* '''{elem}''' - Is the internal name for one of the [[Translation Workbench]] elements | ::* '''{elem}''' - Is the internal name for one of the [[Translation Workbench]] elements | ||
:: | ::* '''key''' - Is the index value used to look up a translated string | ||
: | The possible values are shown in this table: | ||
! Element | :{| border="1" cellpadding="5" cellspacing="1" | ||
|- | ! Element !! Key Format Β | ||
|- Β | |||
|- | action || | ||
|- | |||
application || <tt>{application_name}.{sub_type}</tt>, where <tt>{sub_type}</tt> is either <tt>label</tt> or <tt>widgetTitle</tt> | |||
|- Β | |||
customlabel || <tt>{category}.{token_id}</tt> | customlabel || <tt>{category}.{token_id}</tt> | ||
|- | |- | ||
enumeratedfield || | |||
|- Β | |||
field || <tt>{object_name}.{field_name}</tt> | field || <tt>{object_name}.{field_name}</tt> | ||
|- | |- Β | ||
form || <tt>{object_name}.{sub_type}.{layout_name}</tt>. For example, Customers.RelatedInformationSection.DefaultLayout. | form || <tt>{object_name}.{sub_type}.{layout_name}</tt>. For example, Customers.RelatedInformationSection.DefaultLayout. | ||
|- | |- Β | ||
globalpicklist || {{TBD|}} | globalpicklist || {{TBD|}} | ||
Β | |- | ||
Β | homepage || | ||
|- | | | ||
object || | |||
|- | |||
reportfolder || | |||
|- | |||
report || | |||
|- Β | |||
sidebar || <tt>{sub_type}.{name}</tt>, where <tt>{sub_type}</tt> is either <tt>label</tt> or <tt>widgetTitle</tt>. | sidebar || <tt>{sub_type}.{name}</tt>, where <tt>{sub_type}</tt> is either <tt>label</tt> or <tt>widgetTitle</tt>. | ||
|- | |- Β | ||
validation || <tt>{object_name}.{validation_message_name}</tt> | validation || <tt>{object_name}.{validation_message_name}</tt> | ||
|- | |- Β | ||
view || <tt>{view_type}.{object_name}.{label_name}</tt>, where <tt>{view_type}</tt> is one of <tt>objectRelatedViews</tt> or <tt>otherViews</tt>. | view || <tt>{view_type}.{object_name}.{label_name}</tt>, where <tt>{view_type}</tt> is one of <tt>objectRelatedViews</tt> or <tt>otherViews</tt>. | ||
|- | |- Β | ||
webtab || <tt>{sub_type}.{name}</tt>, where <tt>{sub_type}</tt> is either <tt>label</tt> or <tt>widgetTitle</tt>. | webtab || <tt>{sub_type}.{name}</tt>, where <tt>{sub_type}</tt> is either <tt>label</tt> or <tt>widgetTitle</tt>. | ||
|- | |- Β | ||
workflow || <tt>{object_name}.{workflow_name}.{label_name}</tt> | |||
|} | |} | ||
Revision as of 01:00, 16 June 2011
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
- Method
- GET
- URI
- https://{domain}/networking/rest/translationWorkBench/{elem}/{key}
- https://{domain}/networking/rest/translationWorkBench/{elem}/{key}?args=param1,...
where:
- {elem} - Is the internal name for one of the Translation Workbench elements
- key - Is the index value used to look up a translated string
The possible values are shown in this table:
-
action ||
application || {application_name}.{sub_type}, where {sub_type} is either label or widgetTitle
customlabel || {category}.{token_id}
enumeratedfield ||
field || {object_name}.{field_name}
form || {object_name}.{sub_type}.{layout_name}. For example, Customers.RelatedInformationSection.DefaultLayout.
globalpicklist || __TBD__
homepage ||
reportfolder ||
report ||
sidebar || {sub_type}.{name}, where {sub_type} is either label or widgetTitle.
validation || {object_name}.{validation_message_name}
view || {view_type}.{object_name}.{label_name}, where {view_type} is one of objectRelatedViews or otherViews.
webtab || {sub_type}.{name}, where {sub_type} is either label or widgetTitle.
workflow || {object_name}.{workflow_name}.{label_name}
Element Key Format object ||
- 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, http://localhost/networking/rest/translationWorkBench/customlabel/validation.record_deleted?args=5, when the user's language is Spanish.
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<translationWorkBench> <key>validation.record_deleted</key> <translatedText>5 registros eliminados con Γ©xito</translatedText> </translationWorkBench>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- 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.