String Editing Tool for Multiple Languages


String Editing Tool for Multiple Languages, is a tool for editing the strings used on the pages. When the displaying language is switched, the strings will be switched acording to the displaying language.

Using this tool, you can add a string to be displayed, giving the string ID, and the string of each language can be edited in parallel.

Instructions

Create a new string

Press the "Create a new string" button to add a row to the string table.

In the "StringID", enter the unique ID of the string. StringID is a string that begins with English letters, and constructed by English letters, dot and numbers, the maximum length of StingID is 64 characters.

In the column of each language, input the string of the language. Length of the string can be up to 1024 characters.

Delete a string

Select a row in the string table, the row will be displayed in red.

 Press the "Delete" button.

"Save" button

If you want to save the edited result immediately, press the "Save" button.

The result message of saving file will be displayed in the label at the right side of the "Refresh" button.

"Refresh" button

If you want to discard the changes since the last saving file, or if you would like to load the string tables in the saving directory (/viewer/setting) , you can press the "Refresh" button.

"OK" button

Save the changes, then exit this tool.

If this tool is started from the property list, or the Settings dialog box of controls, it will return the currently selected string ID, and set the string ID to the edit box of the property list or dialog box.

"Cancel" button

Exit this tool without saving the changes. The changes is preserved in memory. When you start this tool at the next time, you can press the "Save" button to save the changed strings.

File name of each language's string table

The string table is stored in the page saving folder (/viewer/setting).

One language will be stored in a file. File names are as follows:

English:lang.txt

Japanese:lang.jp.txt

Chinese Simplified:lang.zh.txt

The method for swithcing language

To switch the language displayed on the screen dynamically, you can configure one or a few buttons on the page, open the setting the dialog box of the button, in the "Switch language" setting, select the language you want to switch to. At run time, when this button is pressed, the display language will be switched to the specified language.

Add languages

Now only supports adding languages manually. The followings are steps for adding a language:

1. Download "/viewer/hmiSettings.json" by the browser.

2. Open the downloaded file (hmiSettings.json) with the document editing tools (notepad.exe), edit the following part of the file.

"Languages": [

{ "$(e.lang.eng)": [ "lang.txt", "^en" ] },

{ "$(e.lang.jpn)": [ "lang.jp.txt", "^ja" ] },

{ "$(e.lang.chn)": [ "lang.zh.txt", "^zh" ] },(Enter comma "," here)

Added here a lin as above line. The following is an example for adding Korean.

{ "$(e.lang.korea)": [ "lang.ko.txt", "^ko" ] }(! No comma here!)

「$(e.lang.korea)is a string ID, You need to add a string with this string ID in by this tool later.

「lang.ko.txt」is the file name to save the string table of this language.

ko」is the language code of Korean. The code is the same as lang attribute of HTML tag. This is used to display the same language as the browser by default.

]

3. Upload the above file to "/viewer/hmiSettings.json" by the file tree dialog. Finish.