Localizing messages for end users
PingFederate supports localization for several types of messages for end users.
About this task
Administrators can localize the following message types:
-
on-screen messages
-
email messages
-
text messages (SMS)
-
authentication API error messages
The English contents for each message type are in the <pf_install>/pingfederate/server/default/conf/language-packs
directory.
Message type | Default message file |
---|---|
On-screen messages |
|
Email messages |
|
Text messages (SMS) |
|
Authentication API error messages |
|
Steps
-
Create a copy of the associated default message file in the
language-packs
directory. -
Provide translated text in place of English and then append the standard language tag to the base file name, as indicated in the browser settings.
For example, to localize the user-facing window messages in French, rename the translated copy of the localization file to
pingfederate-messages_fr.properties
.If the system language of the PingFederate server is not English, copy the default (English) message file and append
_en
at the end of the file name for any English users, such as frompingfederate-messages.properties
topingfederate-messages_en.properties
, translate the default message file for the local users, and provide additional translations as needed. -
If you want to include a region, append the capitalized abbreviation to the standard language tag with an underscore between them.
For example, to localize the text messages in Canadian French, rename the translated copy to
pingfederate-sms-messages_fr_CA.properties
.The capitalization and underscore usage might not correspond to the way regions are listed in browser settings. However, the usage is required by the Java-based localization implementation.
-
If you have a clustered PingFederate environment, copy the localized message files to each node.
Result
For on-screen and email messages, developers can also customize the look and feel of the templates by using localization variables in logic statements to control fonts, color, and other style elements. For more information, see the template files for examples.
To maximize performance, PingFederate caches localized UI strings on start-up. For testing new localization implementations, an administrator can temporarily turn off caching by changing the value of the Return the value to |