Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The messages files contained within this directory are property files containing key / value pairs. Editing the value portion of the property will change the text which is displayed in the application.  All All files must be UTF-8 encoded.

 

To add new localisations to the application, create a copy of the 'messagesStatic.properties' file in the locale folder. This file needs to be renamed to include the relevant locale e.g. ‘messagesStatic_pt_PT.properties’. This file can then be edited to change the language for various parts of the Dashboard without needing a restart of the system.

 

The same can be achieved with the user generated language file by changing the name of the file to reflect the relevant locale e.g. ‘messagesUserEntered_pt_PT.properties’ and moving this file into the locale directory. This file when first created requires a full restart of the dashboard server.  Subsequent changes to the file do not require a server restart, but will require a supervisor to clear the cache in the dashboard once the files are updated. Once the cache in the dashboard is cleared, the users will see the translated content.

 

You also need to edit 'available-languages.properties' in locale to enable the Dashboard to pick up your new language files - e.g. add Portuguese=pt_PT. This will then create a drop down menu for the language on the login screen of the Dashboard.

 

Now, any changes made to the 'messages*' language file with the code corresponding to the language you select when logging in will be reflected in the Dashboard. An alternative to selecting your desired language from the drop-down on the login page is to change the URL language query to match the locale e.g. change 'lang=en_GB' to 'lang=pt_PT'. Taking 'en_GB' as an example, the 'en' represents the language whilst the 'GB' represents the country - both parts are important.

...

Info

Whilst changes to the 'messagesStatic.properties' file are picked up upon refreshing the Dashboard, changes to the 'messagesUserEntered*.properties' file will require a restart when the file is first created. Any subsequent changes to 'messagesUserEntered*.properties' file will be picked up after clearing the cache in the dashboard.

When logging in, you can either force the URL to the desired language.

...