The translator can be used to change the existing texts of JSoko or to translate the texts to new languages.
It can be opened via the JSoko settings menu: Settings->Language->Translate texts...
The menu of the translator contains two entries:
Add language file...
Selecting this menu item opens a popup for selecting a new language to be added to JSoko. A new language has to be selected from a list showing all available languages provided by the Java Virtual Machine. The texts for this new language can then be changed in the main translator GUI.
By selecting this menu item it's possible to set new default languages that are used in the main GUI.
The New language is the language whose texts are to be changed.
The Hint language is the language whose texts are displayed as a text template for the translation.
Example: if the English texts are to be translated to Chinese, then select Chinese as New language and English as Hint language.
After the proper languages have been selected their texts are loaded and displayed in a table:
The text key is the string internally used in JSoko for identifying the text. It is displayed because this text key may give some information where in the program the text may be displayed. For instance the text key optimizer.xSelectedSolutions indicates that the corresponding text is used in the optimizier of JSoko.
The second column New text shows the text in the selected new language and the column Hint text shows the texts in the hint language.
To search a specific text key just type letters while the text table is selected. JSoko automatically searches for a text key starting with the types letters. It's also possible to use the * as wild card character.
To change the text of a specific text key, search for the text key and mark the table line of the text key using the mouse or the arrow keys.
This selection loads the text to the text areas at the bottom of the GUI:
The new text can be entered in the New text text area. The example output is displayed at the bottom. Some texts contain special parts like %d. These special parts are filled by JSoko while the progam is running because only then the proper texts to use are known. To help translating the texts JSoko fills these special parts with example content so it's clearer how the text may look like when it is used in JSoko.
All changed texts can be saved using the Save button. As long as the save button hasn't been pressed the old texts can be restored using the Restore button.