Languages
SWF comes with two languages by default, Swedish and English. The language configuration makes it possible to override and extend the default languages, as well as adding new languages.
Important!
The default language folder for is located at [install folder]/resources/lang
.
Replicate this folder structure into your /overlay/
folder if it does not yet exist.
Since /overlay/
is not overwritten during install, any content in this folder will be unchanged during future updates.
The examples below show English, but any modifications need to be done to all languages you plan to support.
Overview
Translations will be merged at runtime, meaning an administrator can use the default translation and only translate the parts that they want to change. This change should be added to the overlay folder structure to override the default translations.
/resources/lang/en/strings.json
{
"common": {
"htmlTitle": "Signing Service",
...
"errors": {
"generalError": "Something went wrong!"
}
}
}
/overlay/lang/en/strings.json
{
"common": {
"errors": {
"generalError": "Oops!"
}
}
}
The resulting translation will be:
{
"common": {
"htmlTitle": "Signing Service",
...
"errors": {
"generalError": "Oops!"
}
}
}
Worth noting:
- The
htmlTitle
has not changed - The
generalError
has changed
Adding a new language
Create a new folder named after the language code, (e.g., fi
for Finnish), in /overlay/lang/
. Create a text file in the fi
folder called display_name.txt
.
/overlay/lang/fi/display_name.txt
In the text file, write how the language should appear in the language selector, for example:
Suomi

Copy the original strings.json
language file from either English or Swedish in /resource/lang/
into the new language code folder:
/overlay/lang/fi/strings.json
Translate the contents to the new language.