Localizing your application
Localizing your application helps users work in their preferred language, which improves their experience and ensures a better understanding of the product. By localizing an application, you can expand your operations to new markets regardless of language barriers.
Localization adapts your application for a specific language or region. During the localization process, the text in your application is translated into the target language, and imported back into Pega Platform. Text that you can localize includes labels, captions, tooltips, and instructions that appear in user-facing components, such as views and portals.
Localization limitations
Localization in Cosmos React applications is an expanding feature. Consequently, it includes certain use case limitations. By understanding the scope of localization support in Pega Platform version 8.7, you can plan your application better.
In Cosmos React applications, you cannot localize the following rules:
- Decision tables and decision trees.
- Case statuses.
- Radio buttons and drop-down controls in a table.
In addition, localization has the following limitations:
- If you save a view manually through Dev Studio, and not in the App Studio authoring environment, the system does not update the localization file.
- The translation package does not automatically include the text from radio buttons and drop-down controls that use data pages. For more information about adding that text manually, see Localizing controls that rely on data pages.
- The translation package does not automatically include the text from properties with prompt lists. For more information about adding that text manually, see Localizing properties with more than one value.
- Deleted views are not deleted from the translation package.
- You cannot delete localization rules.
Creating a translation package in Cosmos React
Expand the user base of your application by translating it into different languages. By creating a translation package, you bundle all the text in your application into a single JSON or Microsoft Excel file, which translators can then process more conveniently.
- In the navigation pane of App Studio, click .
- On the Localization landing page, on the
Translation packs tab, click
New.
The New button on the Localization page - In the New translation dialog box, click Add language.
- In the language list, select the language to which you want to localize the application.
- Optional: To overwrite a previous translation, select the Re-translate existing translations checkbox.
- Click Next.
Result: The system generates a raw translation package. - Click Download, and then select the format of the translation package.
- Click Done.
Tip: You can download the translation package at any time, in either format, from the Language list on the Localization landing page.
Importing a translation package in Cosmos React
Create multiple language versions of your application by localizing translation packages and then importing the packages into your application. You can upload a newly translated package on the Localization landing page, which offers a convenient way to manage the language versions of your application.
In addition, you can use the Localization page to import Pega language packs, which provide a translated ruleset with values of fields that typically appear in every application, such as button labels or prompts.- In the navigation pane of App Studio, click .
- On the Translation packs tab, in the row that represents
the language of your translation, in the Status column,
click the More icon.
The More icon on the Translation packs tab - Click Import translation.
- In the Import translation modal dialog box, upload the file with the translation.
- Click Next.
Tip: If the system shows import errors, check the ruleset for locked rules. - When the import completes, click Done.
Result: The status of the translation changes to Resolved.
Creating localization rules in Dev Studio
Gain a more granular level of control over the localization process by generating localization rules in Dev Studio. For example, you can use localization rules to manually add properties to a translation package, even when the system omits them.
- In the header of Dev Studio, click .
- In the Upgrade section, in the Upgrade branch name list, select the branch where you work.
- Click Upgrade views.
Result: The system launches an upgrade process that generates localization rules for all views in your application.
Localizing controls that rely on data pages
Ensure that your interface does not include untranslated picklists and radio buttons by adding controls that source entries from data pages to the translation package. Because data pages are empty when the system generates the translation package, you must add their content manually.
- In the navigation pane of App Studio, click .
- On the Additional text tab, find the data page related
to the control that you want to localize, and then click the icon.
The More icon on the Additional text tab - In the Edit record modal dialog box, populate the data
page with the values that you want to localize by entering each value in a
separate row.
For example: Your vehicle loan application includes a Vehicle type picklist that lists the following vehicle types: car, van, truck, and motorcycle. The vehicle types are sourced from the D_AutoLoanList data page. You want to include the vehicle types values in the translation package. In the Edit record, you then enter the same values: Car Van Truck Motorcycle
- Click Submit.
Localizing properties with more than one value
Provide your localization team with access to all properties and ensure that no element of your interface remains untranslated. When generating a translation package, the system omits local properties that have multiple values, such as properties associated with picklists. You can add these properties to the translation package manually by editing their localization file in Dev Studio.
- Generate localization rules for the application. For more information, see Creating localization rules in Dev Studio.
- Perform a private edit to set pxEnableC11nDev to true. For more information, see Performing a private edit.
- In the navigation pane of Dev Studio, click App.
- Click Branches.
- In the application node, expand the branch where you work, and then expand the
Localization node.
Result: The node displays a list of localization rules for the application. Localization node in a sample application - On the localization rule list, select the rule associated with the property that you want to include in the translation package.
- On the rule form, click Check out.
- On the Default tab, select the Mark as editable checkbox.
- In the Locale Json field, enter the values that you want
to translate in a JSON form.
For example: Your mortgage application might include a drop-down where you select what kind of asset the loan is for. In this scenario, your JSON file could have the following structure: { "AssetType": { "House": "House", "Apartment": "Apartment", "Land": "Land" } }
- On the rule form, click Save, and then click Check in.
- In the Check in modal dialog box, in the Check-in comments field, enter a comment that describes your changes to the rule.
- Click Check in.
Previous topic Internationalization and localization Next topic Converting your UI for right-to-left languages