Page tree
Skip to end of metadata
Go to start of metadata

On this page:

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

Introduction

By default, the CAST Application Analytics 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. fr_FR)
  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 portal/locales/<locale> (AAD) or engineering/locales/<locale> (AED) folders within the deployed WAR files
  2. Edit the portal/resources/cmp.json (AAD) or engineering/resources/ced.json (AED) files to define the language parameter to the locale desired (in the example, fr_FR)
  3. 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 files at the following locations:
AAD: portal\locales\aad-localization.pot
AED: 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/fr_FR.po -t ./locales/fr_FR/translation.json
i18next-conv -l en -s ./locales/fr_FR.mo -t ./locales/fr_FR/translation.json

Step 3: Integration

For AAD

  • Create a new folder called <locale> in portal/locales. For example, if you are translating into fr_FR, create a folder called portal/locales/fr_FR.
  • Copy the translation.json to the portal/locales/fr_FR folder within the deployed WAR file.
  • Update or define the language parameter in the portal/resources/cmp.json file to match the language you have translated into:
{
    "title": "Application Analytics Dashboard",
    "language": "fr_FR",
	...
  • Save the portal/resources/cmp.json file.
  • Restart the web application server to view the translated dashboard.

For AED

  • Create a new folder called <locale> in engineering/locales. For example, if you are translating into fr_FR, create a folder called engineering/locales/fr_FR.
  • Copy the translation.json to the engineering/locales/fr_FR folder within the deployed WAR file.
  • Update or define the language parameter in the engineering/resources/ced.json file to match the language you have translated into:
{
  "description": "...",
  "configuration": {
    "confirmLogout": true,
    "filterHealthFactor": true,
    "language": "fr_FR",
	...
  • Save the engineering/resources/ced.json file.
  • Restart the web application server to view the translated dashboard.

Specific tips for the CAST Application Analytics Dashboard

The way the CAST Application Analytics 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/translation.json contains lots of translatable strings that will apply throughout the dashboard. As for AED, this is the main source of localization for texts in AAD.
  • portal/resources/cmp.json defines the home page and detail pages at portfolio level. Numerous texts that will be displayed in AAD 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.

To full translate the CAST Application Analytics Dashboard, you need to work through all of these resources. 

What is not translatable in AAD / AED?

  • 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.
  • No labels