Home Search

DriveWorks Pro 23
Live UI Translations

Send Feedback

Translations

The Live UI has built in functionality to automatically detect a user's browser language and load the site in the given language.

This requires a file to exist for the user's language in this location:

Custom\Localization

When the site loads it sends a request for the text based on the browser's language settings.

DriveWorks will then stack the requested languages in preference order if they exist.

If a language doesn't exist DriveWorks will display in English.

Adding a Language

Before adding translations review the Customizing the Live UI help file to understand the folder structure.

To create a new translation:

  1. Copy the default file:

    System\Localization\LocalizedResources.json

  2. Paste the file into:

    Custom\Localization

    Create the Localization folder if it doesn't already exist.
  3. Rename the file to include the language code:

    LocalizedResources.[language code].json

  4. Modify the file, changing the desired values.
    The file contains name-value pairs, the name should not be changed, only the value.
You do not need to translate the whole file, you can delete lines to have the site fall back to the default English.

Language Codes

The language codes used by the Live UI are based on ISO 639.

Example

LanguageISO 639 codeFile name
繁體中文zhLocalizedResources.zh.json
DeutschdeLocalizedResources.de.json
EspañolesLocalizedResources.es.json
FrançaisfrLocalizedResources.fr.json
NederlandsndLocalizedResources.nd.json
PortuguêsptLocalizedResources.pt.json

Browsers generate these based on the browser/system language, this can be configured within the browser:

Chrome language settings

Language Collation

If the highest priority language doesn't exist, because you don't have a LocalizedResources file for it, the site will display in the next available language and cascade down.

For example, if the user sends a request for en-GB,en;q=0.9,fr;q=0.8,de;q=0.7 the following files would be merged from highest to lowest priority:

  1. Custom\LocalizedResources.en-gb.json
  2. Custom\LocalizedResources.en.json
  3. Custom\LocalizedResources.fr.json
  4. Custom\LocalizedResources.de.json
  5. System\LocalizedResources.json - this is the default installed language file

However, if only the following files existed:

  1. Custom\LocalizedResources.fr.json
  2. Custom\LocalizedResources.de.json
  3. System\LocalizedResources.json - this is the default installed language file

Then the site would display to the user in French as that is the highest priority language available.

This is an unlikely scenario as not that many users have multiple languages declared in their browser and will likely only occur for English users.

To ensure this doesn't occur, copy System\LocalizedResources.json to Custom\LocalizedResources.en.json

Translating Your Projects

You can use the Current Client Language Special Variable to get a list of the current client languages.

The result of this can be used in rules to have your projects translated base don the user's language.