Verify that your translation Web Service is set up in the Web Services
Manager and that you have an API key for the service.
- Open the One-Step Manager, and verify that the association is set
to the Business Object to be configured for translation. For example, select
Association>Incident.
- Click
Create New.
- Add a
Call a Web Service Action to the Designer
Board.
- With the Call a Web Service Action selected, in the General
properties, click the ellipses button next to
Service.
The Web Services Manager opens. Select your translation Web
Service and then click
OK.
- Check the box next to
Store result as: Call a web service result.
This stores the translated text as a variable.
- In the Method properties, set the parameter values.
For example, if using the Google Translate API, set the
following parameters:
q (Endpoint Parameter)
| The Field that contains the text to be
translated, such as
Incident.Description |
target (Endpoint Parameter)
| The target language for the
translation, such as
en for English
|
key (Endpoint Parameter)
| The API key
|
- Add an
Update Business Object
Action to the Designer Board.
- In the General properties, check the box to
save Business Object after action.
The Business Object Record will be saved each time the
One-Step Action is run.
- In the Fields properties, select the Field that contains the
translated text and choose
Template from the available options.
Right-click in the white space and select
Variables>Call a web service result. For
example, expand Incident and set the Translated Description Field.
The Field is now set to the variable that contains the
translated text.
- Optional: Right-clickcall a Web Service
result and select
Modifiers to modify the value of the variable.
For example, if using the Google Translate API, the JSON response includes
other information in addition to the translated text. Modify the value so that
only the translated text is displayed in the Field.
- Optional: Define an automatic action so that the translation
One-Step Action is executed automatically when the Business Object is saved.
See
Define Automatic Actions for a Business Object