Creating and applying a custom language pack
The TrueSight Presentation Server supports the English, Chinese, and German languages out-of-the-box. Use this procedure to create and apply the custom language pack to the TrueSight Presentation Server.
Before you begin
Take a backup of the tomcat folder located in the installationDirectory\truesightpserver\modules directory.
Creating a custom language pack
Perform the following steps to customize your language pack:
Run the tssh locale command from the installationDirectory\truesightpserver\bin folder:
tssh locale add <language-name> <language-code> <resourceFileName>language-name - Name of language that you want to be displayed in the language drop-down list on the TrueSight console. For example, English, Chinese, French.
language-code - ID for the language. For example, en for English, zh for Chinese, fr for French.
resourceFileName - JSON file for the language. The format for this file is <language-code>.json. For example, en.json, zh.json, fr.json.
For example, consider a scenario in which you want to add the French language.
tssh locale add French fr fr.json- Stop the TrueSight Presentation Server.
- Configure the json file for the new language:
- Navigate to the installationDirectory\truesightpserver\modules\tomcat\webapps\ROOT\WEB-INF\classes\ folder and make a copy of the en.json file in the same folder.
- Rename the copied en.json file as the new language that you want to add. For example, rename the en.json file as fr.json.
Edit the new json file and add the following:
user.preferences.language.<language-name>": "<localized string for the language display name>"For example, in the fr.json file, add "user.preferences.language.french": "français".
- Save the new <language-code>.json file (for example, fr.json) and make a copy of it.
Open the ROOT.war file located in the installationDirectory\truesightpserver\modules\tomcat\webapps\ folder with any extractor utility (for example, WinZip) and navigate to the \WEB-INF\classes\ folder. Move the copied <language-code>.json file to this folder.
- Add the i18n message of newly added language in all the pre-existing locale json files located in the installationDirectory\truesightpserver\modules\tomcat\webapps\ROOT.war\WEB-INF\classes\ folder.
- Navigate to the installationDirectory\truesightpserver\modules\tomcat\webapps\ROOT\WEB-INF\classes\ folder.
Edit the en.json file and add the following for the new language:
user.preferences.language.<language-name>": "<localized string for the language display name> - <Language-display-name>"For example, add "user.preferences.language.french": "français - French".
- Save the en.json file and make a copy of it.
- Open the ROOT.war file located in the installationDirectory\truesightpserver\modules\tomcat\webapps\ folder with any extractor utility and navigate to the \WEB-INF\classes\ folder. Move the copied en.json file to this folder.
- Repeat steps from a to d to add the i18n message for the new language in the zh.json and de.json files.
- Download the angular-locale_<language-code>.js file for the new language from the github website and move this file in the installationDirectory\truesightpserver\modules\tomcat\webapps\ROOT.war\i18n\ folder. For example, download and add the angular-locale_fr.js file.
- Add the json file having the localized text in all war files for the TrueSight console labels:
- Navigate to the installationDirectory\truesightpserver\modules\tomcat\webapps\cmaApp\WEB-INF\classes\ folder.
- Make a copy of the en.json file in the same folder and rename the copied en.json file as the new language that you want to add. For example, rename the en.json file as fr.json. Localize the content of the new file.
- Open the cmaApp.war file located in the installationDirectory\truesightpserver\modules\tomcat\webapps\ folder with any extractor utility and navigate to the \WEB-INF\classes\ folder. Move the new <language-code>.json file to this folder.
Repeat steps from a to d for the following war files located at installationDirectory\truesightpserver\modules\tomcat\webapps\<WarFileName>.war\WEB-INF\classes\ folder:
- ROOT
- perfAnalysis
- itda
- infraApp-dashlets
- infraApp
- dashlets-default
- dashboard
- commonAdminApp
- app-visibility
- appcontext
For example, installationDirectory\truesightpserver\modules\tomcat\webapps\ROOT.war\WEB-INF\classes\
- (Applicable for BMC Service Resolution integration only)
- Navigate to the installationDirectory\truesightpserver\conf\resources\i18nData folder and create a folder for the new language. For example, create fr_FR for French.
- In the new language folder, create the jsp folder.
Copy the ibrsdConfig.properties file from the installationDirectory\truesightpserver\conf\resources\i18nData\en_US\jsp folder and paste it in the new language jsp folder.
- Add the entry for the new language in the i18nConf.conf file located in the installationDirectory\truesightpserver\conf\ folder:
- Edit the i18nConf.conf file.
- Look for the supportedLocales property name and add the entry for the new language to the list of existing languages.
For example, supportedLocales=en_US,zh_CN,de_DE,fr_FR
- Restart the Presentation Server.
Validating a new language in the TrueSight console
Perform the following steps to validate the newly added language in the TrueSight console:
- Log in to the TrueSight console and select User Preferences from the actions menu.
- Edit the User Preferences options.
- In the Language drop-down list, select the newly added language.
- Click Save.