Localization in Constellation
Localization in Constellation
Enjoyed this article? See more articles in Constellation 101 series.
Why
Localizing your application helps users work in their preferred language, which improves their experience and facilitates a better understanding of the product. By localizing an application, operations can be expanded to new markets regardless of language barriers.
Business use cases
- An organization wants to reach a global audience with their product(s) in multiple languages.
- Localizing applications improves user satisfaction and engagement by aligning with regional language and cultural preferences.
Benefits:
Internationalization and localization help an organization reach a wider audience by making their application available to users who speak different languages.
Prerequisites
- Ensure your application is built on Constellation.
- Resource fluent in English and in the language of localization is required to do translations.
- Constellation AppStatic service must be configured.
Quickstart steps to first-time Localization of an application
A Roadside Assistance (RSA) application was generated using blueprint. Here are key configuration points used for localizing the RSA application to German:
Step 1: Download and install Pega language pack from Marketplace if available. Choose the Constellation version and follow the import instructions contained in the downloaded zip file.
Note: At the time of writing this article adding the Pega language pack from marketplace after doing localization steps for an application outlined below will not work. There is a bug with synchronization to the App Static server that currently prevents this.
It is crucial to do the import step first.
Step 2: Create the application-specific localization rules (Rule-UI-Localization) following the well-documented steps here.
Note: Localization rules declare what rules are eligible for translation into another language. They already exist for eligible Pega Platform rules; this step creates the localization rules which apply to classes in the new application. For example, the Roadside Assistance application for GoGo Road would have localization rules which apply to GoGo-RSA-Work classes:
These localization rules represent the base locale code for English, namely en_EN.
Step 3: Switch to App Studio and run the localization wizard (Settings > Localization > Add New) for the language of interest.
The localization process in Constellation has generative AI capabilities that reduce time-to-market for multilingual applications:
Localize With GenAI - developers can generate machine-translated text for the application directly from the Localization landing page.
The AI-generated translations serve as a starting point, covering labels, buttons, prompts, and field values across the application interface.
Re-translate all layers - ensures translation consistency across Pega's situational layer cake architecture—automatically propagating changes through business units, channels, and customer segment variations without requiring manual updates to each layer.
Step 4: Download the json and/or Excel file. The resulting folder structure is:
In exported file you may see some strings already translated. These are translations applied from a language pack from marketplace (PegaRULES and Constellation core applications). In Excel file, if “Localize With GenAI” was selected, you may see automatically translated text highlighted in yellow.
Note that organizations should remain cautious about the risks associated with AI translations and implement necessary checks to maintain the integrity of their localized content.
Step 5: Unzip json/excel file and proceed to add translations for application-specific localization. For example, the following View was modified in the RSA-de-DE.json file:
To translate Paragraph Rules with Step instructions, go to paragraph\translated folder and replace the text in the <p> tags. Source for the translation can be found in paragraph\base directory.
Step 6: Repackage the translation folder and import using the localization wizard:
Note: Importing the translation zip file will automatically create a ruleset containing the localization rules for imported package, for example RSA_de-DE, however the ruleset will not be included in application ruleset stack:
Step 7: Save the application rule to ensure synchronization of translations to the app static server.
Step 8: Add locale to testing Operator ID, i.e., de_DE, for German language.
Step 9: Switch to App Studio and preview:
The pyPrimaryFields view translated in Step 5 is reflected above. Using your browser's developer tools to observe network traffic the requests to the app static server to retrieve the locale translation can be observed:
The corresponding response which represents the json translation synchronized to the app static server during Step 7 is also observed:
Points to consider:
Creating the localization rules for the application resulted in the corresponding translation content which was modified in Step 5. Likewise importing the marketplace core language pack resulted in translation content for Pega platform rules when the new language was added to RSA via the wizard in App Studio. The translations are automatically performed for these rules and this content is synchronized to the app static server along with the application-specific translations. For example, the pulse utility was automatically translated and added to the RSA_de-DE.json file when the German language was added to the RSA application:
The request and response for these translations from the app static server result in Pega platform localization:
References: