On this page:

Summary: this page describes how to configure the Health Dashboard and Engineering Dashboard to display text in a language other than the default English, i.e. how to localize the dashboards.

The following locales are supported (a green tick indicates a supported locale). All other locales that are added will not be displayed.

Locale8.3.38.3.4Notes

English (en_US)

(tick)(tick)Default locale.

Chinese (zh_CN)

(tick)(tick)This locale has been fully translated already and is delivered in the WAR from v. 1.10.0.

French (fr_FR)

(error)(tick)These locales have note been translated and therefore require manual translation before the dashboard locale can be set to one of them.

German (de_DE) 

(error)(tick)

Japanese (ja_JP)

(error)(tick)

Korean (ko_KR)

(error)(tick)

Portuguese (pt_PT)

(error)(tick)

Spanish (es_ES)

(error)(tick)

Turkish (tr_TR)

(error)(tick)

Introduction

By default, the Health and Engineering Dashboards are delivered with language display set to English: all messages and text displayed in the dashboard is only displayed in English. However, it is now possible to set a specific locale and provided that a translation of the default English text and messages has been configured, the dashboards will then display text and messages in the chosen language.

The process of internationalizing the dashboard is shown in the image below - click to enlarge:

This results in the following steps:

Step 1: Translation

  1. Provide .POT resource to translator. .POT file contains the text and messages for translation
  2. The translator translates the text and messages to some other language (e.g. zh_CN)
  3. The translator sends back the the translation as a .PO file

Step 2: Preparation

  1. The .PO file needs to be converted to .JSON format so it can interpreted correctly by the CAST AIP dashboards.
  2. The .JSON file to be renamed translation.json

Step 3: Integration

  1. Copy the translation.json to the following folders within the deployed WAR files (the <locale> folder will already exist)
    1. portal/locales/<locale> (Health Dashboard) 
    2. engineering/locales/<locale> (Engineering Dashboard) 
  2. Restart the web application server to view the translated dashboards.
Note that it is possible to manually modify the translation.json file embedded in the WAR file instead of passing through the POT > PO > JSON mechanism, however if you want to work with a translator, CAST highly recommends that you use the process described in this guide.

Step 1: Translation

Provide the .POT file to your translator. The .POT files are embedded in the CAST dashboard WAR/ZIP files at the following locations:

WAR 1.x
Health Dashboard: portal\locales\aad-localization.pot
Engineering Dashboard: engineering\locales\aed-localization.pot

WAR ≥ 2.x
Health Dashboard: static\portal\locales\aad-localization.pot 
Engineering Dashboard: static\engineering\locales\aed-localization.pot

ZIP ≥ 2.x - The files are located in a compiled JAR file located at the root of the unpacked ZIP. This JAR file will need to be unpacked to find the files:
Health Dashboard: <unpacked_jar>\BOOT-INF\classes\static\portal\locales\aad-localization.pot 
Engineering Dashboard: <unpacked_jar>\BOOT-INF\classes\static\engineering\locales\aed-localization.pot 

The translator then needs to edit and translate the .POT file to create a resulting .PO file containing the translated text and messages. CAST highly recommends using the third party tool https://poedit.net/ to achieve this.

Step 2: Preparation

npm install i18next-conv -g

Then, in the place where your .PO file is located, run the following commands (change the local code to the language you require):

i18next-conv -l en -s ./locales/zh_CN.po -t ./locales/zh_CN/translation.json
i18next-conv -l en -s ./locales/zh_CN.mo -t ./locales/zh_CN/translation.json

Step 3: Integration

Find the target language <locale> folder located in:

WAR 1.x
Health Dashboard: portal\locales\
Engineering Dashboard: engineering\locales\

WAR ≥ 2.x
Health Dashboard: static\portal\locales\
Engineering Dashboard: static\engineering\locales\

ZIP ≥ 2.x - The files are located in a compiled JAR file located at the root of the unpacked ZIP. This JAR file will need to be unpacked to find the files and repacked when the locales files have been populated
Health Dashboard: <unpacked_jar>\BOOT-INF\classes\static\portal\locales\
Engineering Dashboard: <unpacked_jar>\BOOT-INF\classes\static\engineering\locales

For example, if you are translating into zh_CN, a folder called engineering/locales/zh_CN or portal/locales/zh_CN will already exist for you. Copy the translation.json to the locale folder and then restart the web application server. Now click the user name from the top menu and select the Change Language option. Your new language will be available in the drop down - select it to view the dashboard in your chosen language.

Setting the default language

By default, the dashboard language is set to English. Other languages will be available in the Change Language drop down list when a locale is added, as described above. When the Change Language option is used, the new language is configuration is stored in the local browser cache, therefore, if the cache is emptied, then the language will reset to the default (which is set to English out of the box). 

If you would prefer to have your new language as the default for all users, then update the following file:

WAR 1.x
Engineering Dashboard: CATALINA_HOME\webapps\<dashboard>\engineering\resources\ed.json
Health Dashboard: CATALINA_HOME\webapps\CAST-Health\portal\resources\cmp.json
 
WAR ≥ 2.x
Engineering Dashboard: CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\config\ed\ed.json
Health Dashboard: CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\config\hd\cmp.json
 
ZIP ≥ 2.x
Engineering Dashboard: <unpacked_zip>\config\ed\ed.json
Health Dashboard: <unpacked_zip>\config\hd\cmp.json

Change the defaultLanguage option to match the official name for the locale you have added. The dashboard is aware of the official locale names and will match the official name with a locale folder. So adding "Chinese" (as shown below) will force the dashboard to look for a zh_CN locale folder:

Engineering Dashboard 
 
 "configuration": {
    "defaultLanguage": "Chinese",
    "requestAccess": false,
    "confirmLogout": true,
    "filterHealthFactor": true,
    "violationsCount" : 5000,
    "navigation": {
      "pages": [
      ]
    },
 
Health Dashboard

    "title": "Health Dashboard",
    "defaultLanguage": "Chinese",
    "horizontalScroll": false,
    "requestAccess": false,
    "confirmLogout": true,
    "persistNavigationFilters":true,
    "filtering":{
      "filterTags":true
    },
  • Save the ed.json or cmp.json file.
  • Restart the web application server to view the translated dashboard.

Specific tips for the Health Dashboard

The way the Health Dashboard is built means that the translation.json file is not the only source of text/messages that are displayed in the dashboard:   

  • portal/locales/<locale>/translation.json contains many translatable strings that will apply throughout the dashboard. As with the Engineering Dashboard, this is the main source of localization for texts in the Health Dashboard.
  • portal/resources/cmp.json defines the home page and detail pages at portfolio level. Numerous texts that will be displayed in Health Dashboard come from this resource.
  • portal/resources/app.json defines the home page at application level. Tile texts are defined in this file (as for cmp.json)
  • portal/resources/internal/app-navigation.json contains application level detail configuration, including some texts (note that this file has been removed in Health Dashboard ≥ 1.23).

To fully translate the Health Dashboard, you need to work through all of these resources. 

What is not translatable in the Health Dashboard / Engineering Dashboard?

  • Assessment Model information (Quality Rule documentation)
  • All texts that come from the API (i.e. the database) are not translatable
  • Other texts in CSS resources, third party components or in configuration json files.