Internationalization
Message catalog files are specified per language with the two character abbreviation for the corresponding language, or the four-character options when you have locale-specific message catalogs, for example, TrainingPlugin_fr_ca.properties
for Canadian French. These files should be recorded in the messages folder of your plugin project.
To guard against collisions with IdentityIQ base product message key names, or message keys from other plugins, the best practice is to name your plugin's message keys with a prefix that makes them unique to your plugin. For example, consider using your plugin's name as a prefix.
Both the user interface and server side code can access the provided catalogs.
In the user interface, full page plugins and widget plugins use two different mechanisms, because of differences in library support that are included in the pages.
In a Full page plugin component, the HTML uses the msgs
function to translate the text.
In Widgets or other snippets that display text, the spTranslate
function in the SailPoint Bundle Library does the translation, by piping the message key through it.
It is possible to use this syntax in a full page plugin, but only if you have included the SailPoint Angular Bundle Library and have declared a dependency for your angular module on the sailpoint.i18n module
. The spTranslate
function is part of that module.
In server-side code, localization is done with the Message object's localize method, passing it the message catalog key to look up and translate.