Language customization
The English language is the standard language for TS GUI.
As default, all GUI labels and messages are based on English language.
You can select a different language:
- during Login phase (see → Login).
- from TS GUI (see → About Traffic Supervisor).
The languages are managed through a set of JSON files, stored into the product folder:
/opt/ptv-optima-vv.n.xxxxptv-optima-as/standalone/deployments/ts.war/lang/.
The current product languages are:
- ENG.json: English (usual default).
- 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 consist of a couple:
"English term" = "Translated term"
Caution: DON'T MODIFY the "English term".
In some cases, after the installation of PTV Optima, you can desire to localize some terms of the language in use.
This operation consist of a straight override of some parts of a specific XXX.json file, provided by the product. For addressing 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 search in custom-language-files.war the localization files.
Every file found is merged with the same language file previously loaded by the product folder, overwriting just the necessary strings, hence only the strings to be localized.

-
Define the language that you want to localize, selecting 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.
-
From 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 file XXX.json 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 override.
Tip: It is not necessary to stop the Application Server.
-
If TS is running, refresh the browser page for loading the localized strings.
Topics in this section