Language and Translations

SWF has built-in language support for Swedish (sv), English (en) and French (fr) with respective translation files for each language. To enable this functionality, instead of using only Swedish translation files, the following should be added to the overlay/settings/theme.json file:

{
  "enableLanguage": true,
  "defaultLanguage": "sv | en | fr"
}

The language files holds the same structure as other resources in SWF, where the default behaviour can be found in the resources folder and be overridden by adding files in the same folder structure, but in the overlay folder. The resource folder will also be overridden on installation but the overlay folder will not.

Example of how to make changes to the Swedish (sv) strings

Create the following file: overlay/lang/sv/strings.json
Copy any keys from resouces/lang/sv/strings.json into overlay/lang/sv/strings.json and override their values.

IMPORTANT

  • Upgrading Signing Workflow will overwrite language files in resources/lang/. Use overlays/lang for modifications.
  • By default, the application uses Swedish translations.
  • Language dropdown is disabled by default. You need to modify the theme.json file to enable this feature.
  • You must add translations for newly added language options.

Role-based translation

Translations can also be role based where different roles will see different information. The available roles are:

  • signer
  • solicitor
  • admin

To enable role-based translation, simply create a new language file next to the other overlay language files, ie overlay/lang/sv/, and create a file named strings_<role>.json, for instance, strings_solicitor.json. The naming is important where a file named strings_solicitors.json will not be used.

Removed variables

The translation of the sidemenu has been moved and uses the same translation as the dashboard. To change the translation of, for instance, "pending" errands, use the dashboard.pending.title property.

The removed properties are:

  • sidemenu.action
  • sidemenu.admin_accepted
  • sidemenu.admin_pending
  • sidemenu.canceled
  • sidemenu.completed
  • sidemenu.create
  • sidemenu.dashboard
  • sidemenu.expired
  • sidemenu.menu
  • sidemenu.pending
  • sidemenu.rejected