4 switching over the language during the runtime, Switching over the language during the runtime, Project example – Lenze VisiWinNet VisiWinNET Smart Benutzerhandbuch

Seite 199

Advertising
background image

Project example

Creating multiple−language projects (language switching)

Switching over the language during the runtime

4

l

199

SHP−VWNS DE/EN 6.1

4.6.4

Switching over the language during the runtime

Now, we want to assign two buttons to the "FCentral" form, whereby the two buttons
can be used to switch over between languages during the runtime.

1. Pull the CommandButton control element from the Toolbox onto the "FCentral"

form.
The control element will then be shown on the form and the "CommandButton Task"
menu will be opened.

2. Close the CommandButton Task menu by clicking anywhere on the form.

3. Highlight the new control element and open the Properties window.

4. In the Properties window, change the name of the control element:

View

® Text: English

5. In the Properties window under VisiWinNET

® Command, click [...].

The "CommandEditor for ..." dialog opens.

6. Activate the Project language tab and, under Available project languages, select the

entry English (United States).

7. Click OK to close the dialog.

In the Properties window under VisiWinNET

® Command, the entry

"ChangeLanguage(1033)" now appears. You have thus assigned the command to
switch−over the user texts to "English" to this button.(1033 is the "Local Identifier" for
American English; 1031 stands for German.)

8. Repeat the steps to create a further button which you can use to switch back to

German as the user language.

9. Press [F5] to start the project and test the various functions.

Advertising