Configure language in Smart ID Identity Manager
This article is valid for Smart ID 21.10 and later.
This article describes how to configure the language to be used in Smart ID Identity Manager Admin, Operator and Tenant, and how to add or change translations.
<SMARTIDHOME>
In this article, <SMARTIDHOME> refers to /home/nexus, but this can be different depending on the setup.
To avoid issues when updating, NEVER override the translation files provided within the container. Instead, use separate translation files that only contain the strings you want to modify.
After an update, check your modified translations, and make sure that they or their keys are still valid.
Step-by-step instructions
Configure supported languages
Open this file for editing: <SMARTIDHOME>/docker/compose/identitymanager/<admin|operator|tenant>/docker-compose.yml.
Set the supported languages and the default language to be used. This is done in the SYSTEM_PROPERTIES environment variable, see Set properties for Identity Manager Operator.
Property
Default value if not set
Possible values
MLTextTranslationProvider.defaultLanguage
en
Any value from the list provided in "multilanguageHelper.localeString"
multilanguageHelper.localeString
de,en,fr,sv
A comma separated list of valid ISO 639-1 language codes
Modify or add translations
Extract translation files
If the container is not running, start it (it does not matter if the container ends up unhealthy and the application does not work, as long as the container is up).
Copy the original files from the container to your host machine.
BASHdocker cp smartid-idm-<admin|operator|tenant>:/usr/local/tomcat/webapps/ROOT/lang <SMARTIDHOME>/docker/compose/identitymanager/config/translations
Remove the files for the translations you do not support.
Rename the files to have the pattern custom[_<language_code>].properties instead of general[_<lang>].properties.
Add <SMARTIDHOME>/docker/compose/identitymanager/config/translations/custom[_<language_code>].properties as volume to <SMARTIDHOME>/docker/compose/identitymanager/<admin|operator|tenant>/docker-compose.yml.
CODE- "./config/translations/custom.properties:/usr/local/tomcat/webapps/ROOT/lang/custom.properties:rw" - "./config/translations/custom_de.properties:/usr/local/tomcat/webapps/ROOT/lang/custom_de.properties:rw"
(Optional) Run
docker-compose up -d
to recreate the container, so that the new translation files are loaded.
Modify existing translation
To modify existing translations, edit your files in <SMARTIDHOME>/docker/compose/identitymanager/config/translations
In each file, keep only the keys you want to change, and modify their values.
Run
docker-compose up -d
if you didn't run step 6 in "Extract translation files" above, else rundocker-compose restart
.
Add translation
To add a translation file for a language that is not available by default, follow these steps:
Create a new translation file in <SMARTIDHOME>/docker/compose/identitymanager/config/translations/custom[_<language_code>].properties following this naming convention custom[_<language_code>].properties (See ISO 639-1 for a valid list of language codes).
Copy the contents of the extracted general.properties into your newly created file in order to have the keys (See "Extract translation files" above for more information).
Edit the file you created and translate the values to your language.
Add the file as volume (see step 5 in "Extract translation files" above).
Run
docker-compose up -d
so that the container gets the new file.