Skip to main content

Localizing a UI form

3 Tasks

45 mins

Visible to: All users
Intermediate Pega Platform '23 User Experience English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

GoGoRoad stakeholders have a requirement to translate the New vendor Case Type to Spanish.

Use the Localization wizard to localize the New vendor Case Type of the GoGoRoad application, export the files, translate properties on a UI form into Spanish, import the files, set the locale settings, and test the translated form.

The following table provides the credentials you need to complete the challenge.

Role User name Password
Application Developer author@gogoroad pega123!
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Run the Localization wizard

  1. In the Pega instance for the challenge, enter the following credentials:
    1. In the User name field, enter author@gogoroad.
    2. In the Password field, enter pega123!.
  2. In the header of Dev Studio, click Configure > User Interface > Application readiness > Localization> Translate to new language to start the translation process.
  3. In the Select a Language drop-down list, select Spanish ES, and click Add.
  4. Click Next to proceed to the next step.
  5. Click Next.
    Note: If a No unlocked Rulesets available message displays, close the message window and deselect and select the GoGoRoad Ruleset.
  6. Click Enable records for translation to set the localize flag on each record.
    Enable records for translation
    Note: Translation script completion may take a few minutes. The count of enabled records may vary as your practice environment supports the completion of multiple challenges.
  7. Click Next.
  8. Click Download for translation to create the translation pack.
    Note: This may take several minutes. The translation pack automatically downloads to your default Downloads folder.
  9. Click Next.
  10. Save the Work ID of the translation in progress into a text editor for further reference and click Close to close the Localization wizard.

    Note: If the application is translated into multiple languages or if the wizard is executed more than once, you will need the Work ID because there will be more than one Work ID to choose from when you import the translation pack.

2 Edit the TextToTranslate.xml file

  1. Extract the contents of the translation package to your local drive. The translation package decompresses to a folder named Translation_<LanguageSelectedForTranslation>_<DateArchiveCreated>_<TimeStamp> (for example,Translation_Spanish_2021-03-05_15-37-29).
  2. In the TranslationFiles folder, open the TextToTranslate.xml file.
    Note: If using Microsoft Excel 2003 or later, you can edit this file by clicking the Enable Editing button when the spreadsheet first opens.
  3. Enter the Spanish text in column B (Translation) for the labels listed in the following table.
    English terms Spanish term
    Name Nombre
    Street Calle
    City Ciudad
    State Estado
    Latitude Latitud
    Longitude Longitud
    Note: If you do not have access to Microsft Excel, you can edit the XML file with a text editor. After opening the file in the text editor, search for the following string:

    <Cell ss:StyleID="s22">

    <Data ss:Type="String">Name</Data>

    </Cell>

    <Cell ss:StyleID="s24">

    <Data ss:Type="String"/>

    </Cell>

    Then, update the string to add the translation to the second <cell> tag:

    <Cell ss:StyleID="s22">

    <Data ss:Type="String">Name</Data>

    </Cell>

    <Cell ss:StyleID="s24">

    <Data ss:Type="String">Nombre</Data>

    </Cell>

    Repeat the process to search for each English term and add the Spanish translation for each term.

  4. Save the TextToTranslate.xml file to commit your translations.
    Note: Do not change the name of the TextToTranslate.xml file. The translation wizard looks for this exact name during the import process.
  5. After the desired translations are complete, repackage the parent folder as a .zip archive.
    Note: The translation wizard does not allow uploading .zip folders with spaces in the folder name.

3 Import the translation pack

  1. In the header of Dev Studio, click Configure > User Interface > Application readiness > Localization> Translations in progress to upload your file.
  2. Select the appropriate translation Work ID that you noted when running the Translation wizard.
  3. Select the GoGoRoad (Spanish) and enter 01-01-01 as the Ruleset version to which you want to save the translations.
    Note: If you pick a non-localized Ruleset, the wizard creates a new localized Ruleset and version. If the Ruleset already exists, the wizard imports translations to the existing localized Ruleset.
  4. For the HTML paragraphs, Correspondences, and Correspondence fragments, enter 01-01-01 as the Ruleset version.
  5. Click Next.
  6. Click Choose File and select the updated translation package you created in the previous steps.
  7. Click Next to import the translation pack. Confirm that the import log shows 6 translations successfully imported.
    Note: It may take several minutes to import the translation file.
  8. Click Finish and then click Close to close the Localization wizard.

Confirm your work

  1. In the header of Dev Studio, click Configure > User Interface > Application readiness > Localization > Locale Settings.
  2. From the Use Locale drop-down list, select Spanish (Spain) and click Update.
  3. Return to the GoGoRoad application and create a New vendor Case. When the UI form is displayed, verify the field labels are translated as shown in the following image.
    New vendor localized screen
               
  4. Change the Locale Settings back to ingles (Estados Unidos) and click Update.
  5. Create a new Vendor Case and verify the field labels are in English.
    Note: This challenge does not have autograding validations.

This Challenge is to practice what you learned in the following Module:


Available in the following missions:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice