- 28 Apr 2021
- 4 Minutes to read
- Print
- DarkLight
Using Translation Services
- Updated on 28 Apr 2021
- 4 Minutes to read
- Print
- DarkLight
Overview
By setting up a Language in Decisions and utilizing the internal Translation Services, users are provided the ability to translate a String from one Language into their preferred Language.
This Service can translate any String that is provided a translation via the Master Translation List located in the System Data Folder.
This document assumes that the reader has taken the steps necessary to set up the text for translation. To complete this process, please see "Setting Up a New Language."
Example A: Flow Step
- Create a new Flow in a Designer Folder.
- From the Flow Designer, navigate to the Data > Text > Translate category of the Steps tab and attach a Translate Text step to the Start and End step.
- Select the Translate Text step to navigate to its Properties tab to configure its Inputs; Constant map the String for translation in the For String Input. Then, set the mapping for Language to Constant and select the desired language from the dropdown. The For String Input should reflect a value listed in the Master Translation List.
The selected Language must have a defined translation of the For String in its respective Language Folder. - Save the Flow, then if desired, Close the Designer.
Debug
- From the Flow Designer, select the Debug link from the top Action bar, then click FULL.
- Select the Translate Text step, then navigate to Execution 1 > View Input/Output Data.The resulting data will display the Input Language and String, as well as the Output translated String.
Example B: Form Labels
When designing a Form, Designers may translate a statically populated Label component from the Toolbox tab.
The following example utilizes a Japanese translation for the word "Security".- Add a Label component from the Favorite Components category of the Form Controls tab.
- From the newly added component's Properties tab, under Common Properties > Label Text, input the Text of the pre-translated text from the Language Folder.
- Under Data > Label For, input the same text from the Label Text box, then check the Translate Text box.
- Save then Close the Form Designer.
- In an Incognito tab, login to the Account with the established Language Settings and navigate to the Form in the Decisions Studio.
- Right-click the Form and select Run Form.Upon running, the Form will run displaying the translated String in the form of a Label component on the Form.
Example C: Report Titles
- From the Report Designer for a new Report, under Data Sources, Add the Groups and Users Data Source.
- Under Data Fields, Add Account Name and Group Name.
Select the Group Name Data Field to navigate to its Properties tab; under Settings > Title, change the text to the established pre-translated String.
Save the Report, then Close the Designer.
From an Incognito tab, navigate to the Account with Language Settings that are affiliated with the Translated String.
Locate the Report in the Decisions Studio, then right-click it and select Run Report.
Upon running the Report, the Translated String will display, Translated to the designated Language that was established for the Account.
Example D: Tagging Translations
- From the Decisions Studio, navigate to System > System Data > Languages.
- Open the desired Language Folder containing the Translation that will be tagged. Locate the desired String in the Report, right-click it, then select Add > Setup > Manage Tags.
- From the Manage Tags window input the desired Tag in the [type here to add tags] field. If the Tag already exists, select it from the dropdown, if not, press the Enter key, then click Yes to confirm the Tag's creation. Click DONE to exit and save the Tag. Additional TaggingAs with other objects in Decisions, Tags may be applied to more than one object. Repeat the process as desired on any other Translations to help group them together.
- Navigate to a Designer Project and CREATE a new Flow by selecting the CREATE FLOW button from the Global Action Bar.
- From the Flow Designer, navigate to Steps > Integration > Internal Services > TranslationService. Then, attach a GetTranslationsForTag step to the Start and End steps. Hidden CategoriesNote that some categories (such as INTERNAL SERVICES) in the Toolbox may be hidden. To access them, scroll to the bottom of the Parent category (in this case INTEGRATION) and click the Advanced link.
Select the newly added step to navigate to its Properties tab. Under Inputs, set include Only Untranslated to a Constant mapping, and leave the box unchecked. Then, Constant map the language and tag that match the respective Language Folder and Tag from earlier in the example.
include Only UntranslatedIf desired, the include Only Untranslated Input may be used to retrieve any tagged Strings in the Folder that have not been translated.From the same Integration > Internal Services > TranslationService category, add a GetTranslationsForTagAllLanguages step after the Get Translations For Tag step in the Flow.
From the Properties tab of the newly added step, under Inputs, Constant map a True value for include Master Translation List and a False value for include Only Untranslated. Then, Constant map the desired Tag under tag.Save the Flow, then if desired close the Flow Designer via X. Afterward, click the Debug link from the top Action bar, then FULL.
After the Flow runs, select each step, then View Output Data.
Output DataThe resulting Flow Output will show each TranslatedString containing the designated Tag along with its Language, FromString, and whether it is NotTranslated.
The Get Translations For Tag step will only Output Translated Strings from the designated Language, whereas the Get Translations For Tag All Languages will present Translated Strings with the designated Tag regardless of Language.