Language customization
The English language is the standard language for TS GUI.
By default, all GUI labels and messages are based on the English language.
You can select a different language:
- During the Login phase (see → Login).
- From the TS GUI (see → About Traffic Supervisor).
The languages are managed through a set of JSON files that are stored in the product folder:
/opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/deployments/ts.war/lang/.
The current product languages are:
- ENG.json: English (normally, the default language)
- CHI.json: Chinese
- DEU.json: German
- FRA.json: French
- ITA.json: Italian
- POL.json: Polish
- ROM.json: Romanian
- RUS.json: Russian.
The basic element of a language file consists of a couple:
"English term" = "Translated term"
Caution: Don't modify the "English term".
In some cases, after the installation of PTV Optima, you may wish to localize some terms of the language in use.
This operation consists of a straight override of some parts of a specific XXX.json file provided by the product. To address this goal, you must build a package named: custom-language-files.war. This folder, containing the files related to the languages that you want override, must be stored in:
/opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/deployments/custom-language-files.war.
The localization files must be named according to the same convention used for files stored in the folder:
/opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/deployments/ts.war/lang/.
At start time, TS searches in custom-language-files.war for the localization files.
Every file found is merged with the same language file previously loaded by the product folder, hence overwriting only the necessary strings - the strings to be localized.
-
Define the language that you want to localize and select a XXX.json file from the list installed in:
/opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/deployments/ts.war/lang/.
-
Copy the file in a temporary folder.
-
In the file, select a couple "English term" = "Translated term".
-
Modify the "Translated term" according to your localization needs.
Caution: Don't modify the "English term".
-
Repeat steps 3 and 4 for every string that you want to localize.
-
Save the XXX.json file in the temporary folder.
-
Move the file in:
/opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/deployments/custom-language-files.war.
-
Repeat previous steps for every XXX.json you want to override.
Tip: It is not necessary to stop the Application Server.
-
If TS is running, refresh the browser page to load the localized strings.
Topics in this section