Localize AM
User-facing and administration UI pages are only provided in English. However, you can customize and localize the user-facing text as required.
The .json
files in the openam-ui-user/src/resources/locales/en
directory provide the English text. This
directory is available in the downloaded UI source (am-external/openam-ui
).
To localize the user-facing text to a new locale:
-
Make sure you have downloaded the UI source before continuing.
-
Copy the English locale directory (
locales/en
) to a new directory, for example,locales/fr
.The name of the directory should follow RFC 5646 - Tags for Identifying Languages. For example,
en-GB
. -
Edit the files and change the values of the elements for the required locale. Take care not to change the JSON structure or to render it invalid.
-
Rebuild the UI. Learn more in Test and deploy the UI.
You can now redeploy the UI or pack it in your custom AM
.war
file.How does AM choose which language to use?
AM chooses which language to show content in (and loads the associated
.json
files if they exist) based on the user’s locale.The user’s locale is derived in the following order:
-
The
locale
query string parameter in the URL. For example&locale=fr
. -
The locale in the
Accept-Language
HTTP header, which is sent by the user’s browser. -
The default locale, which is set to
en_GB
by default.
-