Debugging techniques in offline localization
Ensure that offline localization of your app works as intended by applying the recommended debugging techniques.
Your application UI is not translated in offline mode
Resolving issues with offline localization
- In Dev Studio, check the
configuration of the field value associated with the untranslated text
to determine whether the field value is dynamic (a property reference),
or static.
- Depending on how the system references the field value, ensure that you
have the correct configuration:
- If the text is retrieved dynamically from a property reference, ensure that the required field values are present in the pyFieldValueWhitelistForOffline HTML rule. For more information about adding dynamically referenced field values to the allow list, see Configuring localization for offline-enabled mobile apps.
- If the field value that is associated with the untranslated text is static, check the section and the field value classes. Ensure that the field value is present in the section class or in the inheritance of the section class.
- If steps 1 and 2 are ineffective, in the console, run the following
script to fetch the localization object, and then verify whether the
required field values are available in the correct class:
- To fetch all the field values,
enter:
pega.offline.clientstorehelper.getLocaleData(localeName, /* success */ function(data) { console.log(data); }, /* failure */ function(error) { console.log("An error has occurred"); } );
- To fetch a single field value,
enter:
pega.clientTools.getLocalizedTextForString(fieldName, FieldValue)
- To fetch a paragraph,
enter:
pega.offline.clientstorehelper.getParagraph(pxInsName, /* success */ function(data) { console.log(data); }, /* failure */ function(error) { console.log("An error has occurred"); } );
- To fetch all the field values,
enter:
Previous topic Configuring localization for offline-enabled mobile apps Next topic Configuring an accessible UI