06 February 2024

Example – Localise reference data

The following procedure describes how to build automated flows in Power Automate to translate reference data used in communications templates and on the applicant portal.

Values are translated using a translation action in Power Automate. Check the accuracy of the translations with your language experts before adding the translated values to Admissions.

Use Power Automate to build flows to translate the text used for the Offer text to Welsh.

How it works

The example requires two flows. The flow Retrieve text retrieves and translates the offer text. Then, the flow Add translated text adds the translated offer text to Admissions. The flows work as follows:

  1. The flow Retrieve text is started manually.
  2. The flow retrieves up to 99 values from the reference data Offer library.
  3. The values and translated values are added to the Excel file OfferLibrayText, which has the columns Source text and Translated text.
  4. The flow Add translated text is started manually.
  5. The flow retrieves the translated text from the Excel file OfferLibrayText and adds the text to Admissions.

Build the example

Build the flows Retrieve text and Add translated text that translate the text used for the Offer text to Welsh as follows:

Build the flow to retrieve text

The image Retrieve text shows the flow to retrieve text in Power Automate, where:

  1. Cloud flow with a manual trigger.

  2. Action read entity collection set to the entity collection to Tribal - Read entity collection and retrieve the offer text from up 99 offer libraries.

  3. Control action that for each offer text retrieved, translates the text into Welsh. Then adds the source text and translated text as a row in the defined Excel file.

Retrieve text
Flow to retrieve offer text

Build the flow as follows:

  1. Create the Excel file Offer library with the table columns Source text and Translated text. Then, save to a location on OneDrive.

  2. On Power Automate, create new cloud flow with a manual trigger.

  3. Add an action to read an entity collection. Go to search search connectors and triggers and add Tribal - Read entity collection and define the service and entity as follows:

    • Set the Service to Admissions.
    • Set the Entity to Offer library.

    • Set the Records to take to 99.

  4. Add a control action. On the flow builder, select + New step and then search for the Control action and then select Apply to each. Define the collection as the output from the previous step.

  5. Add the action to translate the values. On the flow builder, select + New step and then search for the Translate text into another language action. Then, select Welsh.

  6. Add the action to output the translations to Excel. On the flow builder, select + New step and then search for the Excel - Add a row into a table action. Then, define the following:

    • Enter the Location, Document library, File, and Table details for the Excel file created in step 1.

    • Select mainDecisionOfferText for the Source text.

    • Select Translated text for the Translated text.

  7. Test the flow. Manually trigger the flow and check that the Excel file has values for the source text and translated text.

Build the flow to add the translated offer text to Admissions

The image Add translated text shows the flow to retrieve text in Power Automate, where:

  1. Cloud flow with a manual trigger.

  2. Action to read the translations in the Excel file.

  3. Control action that for each offer text retrieved, posts the translated text to the reference data service to add the translated text to Admissions.

Add translated text
Flow to add translated text

  1. On Power Automate, create a new cloud flow with a manual trigger.

  2. Add an action to read the translations in the Excel file. On the flow builder, select + New step and then search for the Excel -List rows present in a table action. Then define the Location, Document library, File, and Table details for the Excel file created in the Retrieve offer text flow.

  3. Add a control action. On the flow builder, select + New step and then search for the Control action and then select Apply to each. Define the output from the previous step, that is value.

  4. Add the action to add the translations to Admissions. On the flow builder, select + New step and then search for the Tribal - HTTP request action. Then define the following:

    • Service is Reference data

    • Verb is POST

    • Relative URL is /localisation/cy-gb/

    For the Body, define the code used in the request and select the Source text and Translated text from the Excel file as shown in the image Body content.

    Body content

    Body content for localisation

  5. Test the flow. Manually trigger the flow and check that the translated text shows where appropriate in Admissions.

Demonstration

The video Offer text localisation shows the flows being used to retrieve and translate offer text and then add the translated offer text to Admissions.

Offer text localisation