In the D2000 System application, there is possible to display some data in several languages. The feature is allowed by means of the program Dictionary.
Within the frame of the Dictionary, you can define languages, keywords and texts, which are assigned to individual keywords.
The procedure for defining your Dictionary is very simple. At first, you have to define the languages, which form the table columns (see the dialog box below). Then define the keywords (the column Key) and text (translations).
The keywords will be used for various definitions (e.g. object description, technical units, user tool description, ... - see the list at the end of the topic). According to your language selection, these definitions will be displayed as they are defined for a particular language in the Dictionary.
In the configuration of the user's parameters, you can either define the language for a user, allow them to switch among the defined languages, or enable them to edit the Dictionary.
To open Dictionary:
- In the D2000 CNF process, click the item Dictionary from the menu Application settings.
- In the D2000 GrEditor, select Dictionary from the menu Configuration D2000 or click the Dictionary button in the toolbar.
- Press the shortcut CTRL+L when you define a text in the input field (it is applied for D2000 CNF, D2000 HI, D2000 GrEditor), or click the button placed next to the entry field. Selected text from the field is copied to the filter and may be used as a base for defining a new key. When using the dictionary, the field is highlighted with bright green colour and may use the keyword.
Example of the dictionary configuration in the D2000 System:
The dialog window is divided into the following parts:
- Filter (1)
- Functional buttons (2)
- List of keywords or translations (3)
- Entry field to define keywords and translations (4)
- Information about keywords (5)
Filter
The filter enables the selection of the required list of keywords or translations from the dictionary.
Control buttons:
Deletes a text from the filter and cancels filtering. | |
Creates keywords based on text in the filter or enables editing the translation for the selected language. |
Functional buttons
Opens dialog window List of keywords and translations. | |
Opens dialog window containing detailed information. | |
Deletes all keywords from the dictionary. | |
Deletes unused keywords from the dictionary. | |
Exports (saves) the dictionary into the *.csv file. The keys can be exported also with a time stamp modify time. Clicking the export button, the above-mentioned modal window opens. | |
Exports (saves) the used keywords into the *.csv file. The keywords can be exported also with a time stamp modify time. Clicking on the export button, the above-mentioned window opens. | |
Exports (saves) the unused keywords into the *.csv file. The keywords can be exported also with a time stamp modify time. Clicking on the export button, the above-mentioned window opens. | |
Exports (saves) the selected keys into the *.csv file. The keys can be exported also with a time stamp modify time. Clicking on the export button, the following modal window opens. | |
Imports the dictionary from a file. Notes: | |
Defining the languages. Clicking the button opens the dialog window for defining the language. |
List of keywords or translations
The contents of the list depend on the filter - keywords or language variations.
If the list contains the keywords, it is able to change their names. When editing the key, there may occur these colours:
- Black – the original name,
- Blue – a new, nonexistent name,
- Purple – a new name already exists,
- Red - the text does not match the conditions for the keyword name, a blank space is either at the beginning or end of the text.
The background of the new keywords is light blue.
If the list contains the keywords, press the right mouse button over the list to open the following menu:
- Create key – adds the key according to the key, over which the mouse cursor is
- Delete key – deletes the key, over which the mouse cursor is, from the dictionary
Entry field to define keywords and translations
When creating the new key, a user must enter the name and translations into the text field. Over the text field, there are these buttons:
Key into an object - this button is enabled only if there is a relation between the dictionary and text entry field. This connection is created when pressing CTRL+L or clicking the special button. Then, the keyword will be entered into the field. | |
References of key - opens the dialog window that displays the list of objects, which use the given key. | |
Deletes the key from the dictionary. |
Below the text field, there is a list of translations in various languages. The translations may be edited in this list.
Information about keywords
At the bottom of the dialog window, there is this information:
- Number of current page (number of keys on the page) / number of pages, e.g. 1(200)/75.
- Total number of keys (+keys that are used in the application / -keys that are not used in the application), e.g. 14896 (+3220/-11676).
The arrow keys are used to navigate between the pages.
Controlling dictionary
Adding keywords into the dictionary
- Click Create key.
- Enter the name of the key into the text field in the part for defining the keywords and translations. If the name does not already exist, it has a blue colour. This key will be created when at least one translation is defined. Providing that the keyword already exists, the text is black and the translations are automatically shown. Red text means that the text does not match the conditions for the keyword name, a blank space is either at the beginning or end of the text.
- Enter the translations of the given key in the part Translations.
- After entering the new key, the field has a turquoise background.
List editing
Each record can be edited directly in the list. Click on the particular cell to edit the key or the translation. The edited records (rows) are highlighted in yellow colour. This change of keyword/translation will become evident automatically, any confirmation by a button is not required.
Sorting columns
Clicking on the column header on the left, the data in the table are arranged upwardly, next clicking arranges data downwardly. The icon in the column header shows the word order in the column (ascending/descending).
Keyword usage
When you configure texts, which are shown to users, you can enter the keyword. This keyword will be replaced by corresponding text from the Dictionary according to the language setting for the logged-on user.
If there is no language defined for the user, then the replacing keywords from the Dictionary is disabled.
The keywords are inserted by using the string {!}.
Example:
The string {!DB} displays the following text:
- for Slovak language: Databáza,
- for Czech language: Databaze,
- for English language: Database.
When you want to use these keywords in configuration, use the shortcut CTRL+L to open the Dictionary when the mouse cursor is in the input edit field. When you press the shortcut:
- out of the brackets {!} - select the key in the Dictionary and the key will be inserted on the current cursor position and the Dictionary will be closed,
- between the brackets {!} containing the existing key - the Dictionary automatically finds the key,
- between the brackets {!} not containing the existing key - the Dictionary automatically provides the possibility to create the key you have entered.
Keywords defined in the Dictionary can be used when you configure the following texts:
- all object types - the parameters Description and Technical units,
- graphs, reports and compositions - the parameter Description,
- graphs - the parameter Axis description in the Axis configuration dialog box and the parameter Description in the Object configuration dialog box,
- when configuring the External tools in D2000 HI - the column Description,
- console (or user) preferences, the parameter group Critical alarms and Uncritical alarms - the parameter Tab name,
- console (or user) preferences, the parameter group Logging - tooltips for the buttons in the User toolbar,
- pictures, display palette, bitmap and extended ones - the parameter Description,
- graphic object of Text type - the parameter Info text,
- Windows controls - the parameters Description and Info text,
- displayers - the parameter Info text,
- Column displayer and Point displayer - the parameter Description,
- when connecting the structure to Browser, the tab Parameters, the button Columns - the column Caption,
- object of HI menu type, the tab Menu - item names (the parameter Item),
- object of Status text type, the tab Texts - the column Text,
- object Structure definition type, the tab Structure - the column Description,
- object Display mask type, the tab Mask - the column Description,
- the process D2000 CNF, the menu Application settings, system texts - the column Text.
Note: To use your Dictionary from a script, see the functions %HI_LNG_GetCurrLngIdx, %HI_LNG_Translate, %LNG_Translate and %LNG_GetCurrLngIdx.
Pridať komentár