Creating Dictionary Files for Translating System Information
If your system needs to use translated terms, you need to configure dictionary files so that they contain the original string (the string that is to be replaced) and the translation string (the string that is to replace the original string).
Each dictionary file is a simple text file that can be created in Notepad or any word processor application.
There are three types of dictionary file:
- Country specific file—The country specific file is the first dictionary file that ClearSCADA will use. The file has to be named according to the ISO standards 639-1 and 3166:
<language>-<REGION>.txt
NOTE: The language has to be in lower case with the region in upper case.
For example, if the file contains terms that are used to translate strings into US English, the file would be named en-US.txt. The file would contain the original terms and for each term would have an alternative term in US English.
- Region independent file—The region independent file is the second dictionary file that ClearSCADA will use. ClearSCADA will only search for a term in the region independent file if it was unable to locate the term in the country specific file. The region independent file has to be named according to the ISO 3166 standard
<language>.txt
The region file includes terms that are applied to the variations of a particular language. For example, if the dictionary files are being used to translate terms for the variations of English (UK English, US English, Australian English, and so on), the region independent file has to be named en.txt. This is because en is the code for the language into which the strings are being translated, in this case, English (the local variant of English is not relevant to the region independent file).
NOTE: The language has to be in lower case.
- Default file—The default dictionary file is the final dictionary file that ClearSCADA will use. ClearSCADA will only search for a term in the default dictionary file if that term has not been found in the country specific file or region independent file. The default dictionary file has to be named:
Default.txt
Each dictionary file should be configured to contain search terms and replacement terms. Terms should be enclosed in double quotes " " and separated by commas, with one search term and replacement term on each line. For example:
"falling temperature", "température tombant"
"rising temperature", "température montant"
"falling pressure", "pression tombant"
"rising pressure", "pression montant"
If you want to add comments to the dictionary file to provide information for other users, simply use a single quotation at the start of the comment, for example:
'This dictionary file translates the text box descriptions into French.
To create a dictionary file:
- Use Notepad or any Word Processor program to create a document. The document will be saved as a plain text file (.txt).
- In the document, define a base locale for the file if required. You only need to define a base locale if the language of the dictionary file you are creating is not currently supported by your version of ClearSCADA.
ClearSCADA currently supports several languages including English, Spanish, Dutch and Russian. To see which languages are available on your system, display the Options window (see Display the Options Window in the ClearSCADA Guide to Client Administration). Select the Locale combo box (the combo box contains a list of the available languages). You can also view the available languages by using the Locale combo box on the User Form for your User account.
If you want to create a dictionary file for a language that is not listed in the Locale combo box, you will need to define a base locale.
To define a base locale, enter the following in the dictionary file:
BASE_LOCALE("<language>-<REGION>")
Where <language>-<REGION> is the ClearSCADA supported language that will be used for the base elements of your system (menus, options etc.). The <language>-<REGION> has to be entered in the same format as a country specific file. For example, if you were creating a dictionary file for Afrikaans, you could have a base locale of US English. This would mean that the terms you specify in your Afrikaans dictionary file would be translated into Afrikaans and the base features of ClearSCADA such as menus and menu options would be displayed in US English. To put this into effect, you would need to define the following in your dictionary file for Afrikaans:
BASE_LOCALE("en-US")
When you create a dictionary file for a language that is not supported by ClearSCADA, you have to define a base locale for a language that is supported as well. The language of your dictionary file will be available for selection on the User Forms.
- In the document, enter the terms in their original format followed by the translated format:
"Original Term", "Translated Term"
Each term is enclosed in double quotes and the original and translated terms are separated by a comma. A new line is required for each term and its translation.
NOTE: If you want to add comments to the dictionary file to aid other users, use a single quotation to indicate the start of the comment, for example 'this is a comment to assist other users. There is no need to use an ending quotation mark.
- When you have entered the required terms and translations, save the file as a .txt file. The file has to follow the naming conventions:
language-REGION.txt
language.txt
Default.txtWhere language has to be in lower case and is the language code specified in the ISO 6391 standard, and REGION has to be in upper case and is the regional variant of the language as specified in the ISO 3166 standard.
You should store the dictionary files in a folder that is suitably named so that it is easy to identify when see Associating a System with Dictionary Files.
- Apply the changes to the server configuration by right-clicking on the system icon in the explorer section of the ClearSCADA Server Configuration Tool, and then selecting the Apply Changes option.
- Restart any ViewX or WebX clients so that they are set to search in the defined dictionaries folder.
NOTE: ClearSCADA will only use dictionary files that use the same language and region as the Locale of the currently logged on user's User account.