Using Translation Services
  • 26 Aug 2021
  • 4 Minutes to read
  • Dark
    Light

Using Translation Services

  • Dark
    Light

Article Summary

Overview

By setting up a Language in Decisions and utilizing the Translate Text step, users are provided the ability to translate String Input into their preferred Language. This step can translate any String that is provided a translation via the Master Translation List located in the System Data Folder.

The following document demonstrates how to translate a String input by using the Translate Text step, how to Translate a Form Label, how to Translate a Report Column Title, and how to utilize the Get Translations For Tag steps.

This document assumes that the reader has taken the steps necessary to setup the text for translation. To complete this process, please see "Setting Up a New Language."
Note that before proceeding with any of the examples that Translation Strings are case sensitive. Be sure to pay mind to capitalization and avoid adding any extra characters or spaces. 

Example A: Flow Step

  1. CREATE a new Flow in a Designer Project
  2. From the Flow Designer, navigate to the DATA > TEXT category of the Toolbox tab and attach a Translate Text step to the Start and End step. 
  3. Select the Translate Text step to navigate to its Properties tab to configure its INPUTS. 
    1. Constant map the String for translation in the For String INPUT.
      This input should reflect a value listed in the Master Translation List. 
    2. Set the mapping for Language to Constant, then select the desired language from the dropdown. 
      This Language must have a defined translation of the For String in its respective Folder. 
  4. Save the Flow, then if desired, close via X.


Debug

  1. From the Flow Designer, select the Debug link from the top Action bar, then click START DEBUGGING.
  2. 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. 



    The following example uses the Japanese Translation for the word Security. This has been established and applied to a test User Account


    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".
    1. Add a Label component from the FAVORITES category of the Toolbox tab. 
    2. From the newly added component's Properties tab, under COMMON PROPERTIES > Label Text, input the Text of the pre-translated text in the Language Folder.
    3. Under DATA > Label For, input the same text from the Label Text box, then check the Translate Text box.
    4. Save then close the Form Designer via X.
    5. In an Incognito tab, login to the Account with the established Language Settings and navigate to the Form in the Decisions Studio.
    6. 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

The following Report utilizes the same Translated String from the previous example as a custom Title for Data Field on the Report.  
  1. From the Report Designer for a new Report, under Data Sources, Add the Groups and Users Data Source.
  2. Under Data Fields, Add Account Name and Group Name
  3. Select the Group Name Data Field to navigate to its Properties tab; under SETTINGS > Title, change the text to the established pre-translated String

  4. Save the Report, then close the Designer via X

  5. From an Incognito tab, navigate to the Account with Language Settings that are affiliated with the Translated String

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

For the intended use of better organizing Strings within Language Folders, users with either a v.6.17 or v.7.2 installation have the ability to use Tags in the Decisions Studio/Portal in conjunction with specially designed steps that allow the ability to pull Translations based on their assigned Tags. These tags exist in the form of the  GetTranslationsForTag and GetTranslationsForTagAllLanguages steps located within the INTEGRATION > INTERNAL SERVICES category of the Toolbox tab.

To apply a Tag to a Translation and use Translation steps to locate it:
  1. From the Decisions Studio, navigate to System > System Data > Languages
  2. 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
  3. 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 Tagging 
    As 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. 

  4. Navigate to a Designer Project and CREATE a new Flow by selecting the CREATE FLOW button from the Global Action Bar
  5. From the Flow Designer, navigate to Toolbox > INTEGRATION > INTERNAL SERVICES > TRANSLATIONSERVICE. Then, attach a GetTranslationsForTag step to the Start and End steps. 

  6. 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 Untranslated 
    If desired, the include Only Untranslated Input may be used to retrieve any tagged Strings in the Folder that have not been translated.

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

  8. Save the Flow, then if desired close the Flow Designer via X. Afterward, click the Debug link from the top Action bar, then START DEBUGGING. 

  9. After the Flow runs, select each step, then View Output Data.

    Output Data
    The 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. 




Was this article helpful?