Using the text system for LadderEditor

<< 点击显示目录 >>

主页  mappView帮助助手 > mapp View帮助信息 > Widgets  > Process  > LadderEditor  > Concept  >

Using the text system for LadderEditor

Requirements:

For widget "LadderEditor", there are predefined text files for the integrated commands, which are language dependent.

The aim is to set up and use the text system for the commands and message texts. The advantage here is that the texts can be adapted as needed and then displayed when the language is changed.

mapp CodeBox must be implemented in order to be able to use widget "LadderEditor". For more information, see here.

To find out how the macros and arguments in mapp CodeBox can be localized with the text system, see here.

Solution

Used widgets and files:

LadderEditor: This widget is used to program a ladder diagram.

TMX file: Localizable texts for widget "LadderEditor" that are displayed in the widget.

Setting up the text system

Step 1:

Widget "LadderEditor" is placed on the content and configured to work properly. For more information, see Example configuration.

Step 2

The next step is to add the necessary TMX file to the system. This is located in the Object Catalog under folder "mapp View".

laddereditor_textkeys_logicalview

laddereditor_textkeys_objectcatalog

Step 3

In the next step, the newly added TMX file is opened by double-clicking on it.

The namespace should exist in the following form: IAT/Widgets/LadderEditor.

laddereditor_textkeys_namespace

Step 4

The newly added TMX file must be added to the text configuration in the final step. This transfers it to the target system.

laddereditor_textkeys_configview

laddereditor_textkeys_textconfig

Additional information for the predefined Text IDs

All Text IDs are predefined in the TMX file and can be used. If languages other than English, French or German are required, these must be added and completed by the user.

The text IDs are named after the topic areas that they belong to. For the command drop-down box, for example, the text IDs are CMD_MENU_*; for the messages, they are MESSAGE_*. All others are explained in detail below.

If a text ID is missing entirely, the widget will provide a default text. These standard texts are only available in English. If an entry for a language is missing, the fallback language is used.

To see where the respective text ID belongs, here is a visual guide for the respective area in widget "LadderEditor". These can be mapped to the text IDs in the .tmx file.

Default

Text ID

le_textids_default

le_textids_default_img

Commands

Text ID

le_textids_cmd

le_textids_cmd_img

Network

Text ID

le_textids_network

le_textids_network_edit_contact

le_textids_network_edit_comment

le_textids_network_edit_coil

le_textids_network_edit_delay

Selecting

If a command is selected, a dialog box appears with the corresponding dialog box title.

If command "Load" is selected, for example, the dialog box has the title "Load program".

Text ID

le_textids_select

le_textids_network_select

 

Messages

If a command that cannot currently be executed is selected, the reason for this is displayed in the dialog box.

These messages begin with the text IDs MESSAGE_*.

Messages for Save, Load, Start, Stop, Powerflow

Text ID

le_textids_message

le_textkeys_message_pict

 

Messages in the event of an error

Text ID

le_textids_message_error

le_textkeys_message_error_pict