Online Language Switch

Online Language Switch

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

The language change allows you to switch the language of text information between different languages in the Runtime. This functionality is essential for the realization of international projects.

Examples for the usage are:

  • Delivering a project in different languages
  • Central services, which can be accessed from different countries
  • Decentral equipment, which can be accessed worldwide
  • Language switchable operation of equipment


Requirements

Online Language Switch -> Requirements

Control system since version 6.20

Some basic knowledge about the control system is needed for this tutorial. For new users we recommend to do the tutorial Basic first.

The Project Wizard was used on creating this project. This wizard automatically creates the basic objects, which are not described here but needed for the examples (e.g. Main_Screen, Button_Bar, Functions).

The instructions for the settings in the properties window refer to the Grouped view.


Aim of this tutorial

Online Language Switch -> Aim of this tutorial

Creating the project in this tutorial will take between 1.5 and 2 hours.

The aim of this tutorial is to give you an extensive overview over the possibilities for the language changed offered by the control system. We will start with the basic functionality of switching the language of the texts used in text elements or buttons (even in non-western character sets). Then we will proceed to different special window classes like alarms and CEL, and to the possibility to convert technical units with the help of reports. After this tutorial you should be able to solve all tasks concerning the online switching of languages.


Topics

Online Language Switch -> Topics

Project 1

It should be possible to switch the language of a text online.

Switching between English and Dutch should be possible.

Switching the language should be executed via bitmap buttons with the flags of the according countries.

Project 2

It should be possible to switch the language of a text and the text of a button online.

This time to an Asian language with an Asian character set.

Switching between English and Japanese should be possible.

Switching the language should be executed via bitmap buttons with the flags of the according countries.

Project 3

It should be possible to switch the language of the entries in the Chronologic Event List and the texts on buttons online.

Switching between English and Japanese should be possible.

Switching the language should be executed via bitmap buttons with the flags of the according countries.

Project 4

It should be possible to switch the language of the entries in the Alarm List and the texts on buttons online.

Switching between English and Japanese should be possible.

Switching the language should be executed via bitmap buttons with the flags of the according countries.

Project 5

Switching technical units, e.g. temperatures.

Switching between English and German should be executed via bitmap buttons with the flags of the according countries.

Along with switching between the languages English and German the temperature values should also be switched between degrees Fahrenheit and degrees Celsius.

Project 6

Possibilities to use wizards for switching languages

Project 7

Possibilities to switch the language of Runtime help, text files and media paths.


Switching texts

Online Language Switch -> Switching texts

What is done?

Language switching: Text | It should be possible to switch the language of a text online.
 | Switching between English and Dutch should be possible.
 | Switching the language should be executed via bitmap buttons with the flags of the according countries.


Creating a screen with text

Online Language Switch -> Switching texts -> Creating a screen with text

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Screen | The screen Warning will be created.
Text | A vector element Text will be created.


Screen

Online Language Switch -> Switching texts -> Creating a screen with text -> Screen

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the context menu of the Screens in the Project Manager.
  • Select Screen new.
  • “Screen_0” is created automatically.
  • Change the configuration in the properties window.
  • Change the properties as shown in the screenshot below:

  • Under Representation / Name enter Warning.
  • Select the frame Main_Frame.

This frame has automatically been created by the Project Wizard.

  • Your screen Warning will now be listed in the detailview of the Project Manager.
  • Open it with a doubleclick.


Text

Online Language Switch -> Switching texts -> Creating a screen with text -> Text

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Select the element Text from the pulldown menu Vector elements and draw it in your screen Warning with the mouse.

In the screen the element Text now can be drawn in the desired size.

Now configure the text field in the properties window:

  • Under Representation/Text enter @High temperature!.

info Info

The “@” indicates, that the following text should be translated.

In the control system these texts are called Keywords.


Language table

Online Language Switch -> Switching texts -> Language table

What is done?

Language table | A column Dutch is created in the language table.
 | The existing texts are added to the language table and translated to Dutch.


Language table

Online Language Switch -> Switching texts -> Language table -> Language table

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the context menu of the Language table in the Project Manager.
  • Select Language table new.
  • Enter Dutch in the now opening dialogbox.
  • Confirm it with OK.
  • Click into the cells of the table and enter the texts according to the screenshot below:

  • Select “Save in the context menu of the table.

info Info

In order to save the entries in the language table, select Save from the context menu.

If you move to another line in the table, the entries are automatically saved.

info Info

The sort key for the language table is the column of the keywords, which is sorted alphabetically. New entries are correctly sorted, after the table is reopened.

Via the context menu of the table header the table can be sorted ascending or descending by the according column.

It is possible to use functions Search and Replace.

info Info

The keyword in the language table has to match with the keyword in the project (no leading blank, case sensitive, etc.).


Function "Screen Switch"

Online Language Switch -> Switching texts -> Function "Screen Switch"

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Function Screen switch | In the screen Button_Bar a button for the screen switch to the screen Warning will be added.
 | A function for the screen switch will be created and linked to the button.


Function Screen switch

Online Language Switch -> Switching texts -> Function "Screen Switch" -> Function Screen switch

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  1. Open the screen Button_Bar.
  2. Select the dynamic element Text button from the drop-down list.
  3. Draw the button in your screen Button_Bar with the mouse.
  4. In the screen the button now can be drawn in the desired size.

info Info

You also can copy the existing button Main Window and then configure it as described below.
  1. Click on the button.
  2. Under Representation / Name in the properties window enter @Warning.
  3. Open the context menu of the “Functions” in the Project Manager.
  4. Select Function new.

    The dialogbox for selecting a function now opens automatically.

  5. Under Screen – Functions select Screen switch.
  6. In the now opening dialogbox Select screen select the screen Warning.
  7. Link this function to the button via Drag&Drop.

info Info

You also can link the function in the properties window of the button under Runtime / Function.


Buttons

Online Language Switch -> Switching texts -> Buttons

What is done?

Bitmap button | Two bitmap buttons with flags are created.
Graphics | The graphic files for the flags are inserted in the Editor.
Function Language change | The falgs are linked with the function: Language switching: Dutch and language change: German.


Bitmap Button

Online Language Switch -> Switching texts -> Buttons -> Bitmap Button

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Select Bitmap button from the drop-down list Elements.
  • Add two of them to your screen Warning.


Graphics

Online Language Switch -> Switching texts -> Buttons -> Graphics

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • In the Project Manager open the context menu of File / Graphics and select Add file.
  • Add a Dutch and an English flag.
  • In the detailview of the Project Manager now these two graphics are listed.
  • Link it with Drag&Drop.


Function Language change

Online Language Switch -> Switching texts -> Buttons -> Function Language change

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

info Info

The function Language change switches from one text list to another in the Runtime.
  • In the Project Manager select Function new from the context menu of the Functions.
  • Select the application function Language change.
  • Change the entries in the dialogbox as shown in the screenshot below:

  • Under Text list select Dutch.txt.
  • Under Font list select Font list 1.

Example Example

Create another function Language change for English with the text list zenonStr.txt.
  • Link the bitmap buttons with the flags to the according functions Language change. (Drag and Drop)

info Info

You now are able to switch between all languages with the western character set.


Runtime

Online Language Switch -> Switching texts -> Runtime

What is done?

Runtime

The Runtime is started and the language switch is tested.

The Runtime can be closed with the key combination ALT+F4.


Asiatic character sets

Online Language Switch -> Asiatic character sets

What is done?

Language switching: Unicode | It should be possible to switch the language of a text and the text of a button online.
 | This time to an Asian language with an Asian character set.
 | Switching between English and Japanese should be possible.
 | Switching the language should be executed via bitmap buttons with the flags of the according countries.


Fonts and font lists

Online Language Switch -> Asiatic character sets -> Fonts and font lists

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Font lists | Defining the fonts for the western and the Japanese character set
Fonts | Defining the fonts (western and Unicode)
 | Selecting a font for the buttons
 | Selecting a font for the texts


Font list

Online Language Switch -> Asiatic character sets -> Fonts and font lists -> Font list

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

<<-zenonBoxStart=INFO->>

<<-zenonBoxEnd=INFO->>

info Info

If you want to use Asian characters in the Editor, you first have to activate them in the Windows settings:

Control panel / Regional settings / Languages /Install file for eastern characters.

First two different font lists have to be created. The font list for English in western format, the one for Japanese in unicode.

  • Open the entry Screens / Fonts.
  • In the context menu select Font list new.

In the detailview of the Project Manager two font lists are displayed now.

They can be configured in the properties window.

  • Click on the column header Font list 1.
  • In the properties window Font list 1 is renamed to English.

Example Example

Enter the name Japanese for the Font list 2.


Font

Online Language Switch -> Asiatic character sets -> Fonts and font lists -> Font

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the context menu of the font list German.

Now a font can be selected:

  • Change the properties as shown in the screenshot below:

  • Select the font, the aspect and the size.
  • Under Script select Western.
  • In the properties window of the font list English you can rename the font to Button font.

Example Example

Define another font Arial Unicode MS, aspect and size of your choice, and the script Unicode for the Japanese font list.

We now will define a second font for the texts in the Runtime:

  • Select a smaller font size here (e.g. 8).
  • Under General/Name in the properties window you now can rename the font to Text font.

Now the detailview of our Project Manager should look like shown below:


Texts

Online Language Switch -> Asiatic character sets -> Texts

What is done?

Text | A vector element Text will be created.
Text button | A dynamic element Text button is created.


Text

Online Language Switch -> Asiatic character sets -> Texts -> Text

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Select the vector element Text and draw it in your screen Main_Screen with the mouse.
  • In the screen the element Text now can be drawn in the desired size.

Now configure the text field in the properties window:

  • Click on the text field.
  • Select the defined Text font under Representation/Font.
  • Under Text enter @Communication problem with PLC.


Japanese

Online Language Switch -> Asiatic character sets -> Japanese

What is done?

Language tables | The language table Japanese will be added.
Texts | The texts will be added to the language table.


Language table

Online Language Switch -> Asiatic character sets -> Japanese -> Language table

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Select the entry Language table in the Project Manager.

Example Example

Create another table with the name Japanese.

Now the strings that should be translated can be added to the language table.

The column zenon.Str.txt is created automatically.

info Info

A green text colour in the column header indicates the language that has been selected as the standard language for the Editor. So already in the Editor you are able to check, if the length of the texts does not exceed the length of the according text fields. There is no need to start the Runtime for this.

The language for the Editor can be switched via the context menu of the language table with the command Language file for Editor.

info Info

You have the possibility to select different fonts for the different languages in the language table. The selected font then is displayed in the language table. To do that, open the context menu of the according column and select the font.


Text button

Online Language Switch -> Asiatic character sets -> Japanese -> Text button

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Draw a dynamic element Text button in your Main_Screen.
  • Under Text line 1 in the properties window enter @Alarm.
  • Select Button font under Representation/Font.


Function “Language change”

Online Language Switch -> Asiatic character sets -> Function “Language change”

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Bitmaps | Japanese and English flag as buttons for the language change.
Function | A function Language change will be created.
 | Linking the functions to the flag buttons.


Bitmap Button

Online Language Switch -> Asiatic character sets -> Function “Language change” -> Bitmap Button

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Add two new dynamic elements Bitmap button to your screen Main_Screen.
  • Open Files / Graphics in the Project Manager.
  • Select Add file from the context menu.

info Info

You will find different flags in GIF format in the demo project on the installation CD of the control system under Overview/Custom/Graphics.


Function Language change

Online Language Switch -> Asiatic character sets -> Function “Language change” -> Function Language change

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • In the Project Manager select New function from the context menu of the Functions.
  • Select the application function Language change.

The following dialogbox opens:

  • Under Text list select zenonStr.txt.
  • Under Font list select English.

Example Example

Create another function Language change.

Select Japanese.

  • With Drag&Drop the functions can easily be linked to the 2 flag buttons.

Now our screen “Main_Screen” should look like shown below:


Runtime

Online Language Switch -> Asiatic character sets -> Runtime

What will we do?

Runtime

Starts the Runtime.


Runtime

Online Language Switch -> Asiatic character sets -> Runtime -> Runtime

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • In the Runtime try out switching from one language to the other.

info Info

You now are able to switch all texts between all languages.


Chronologic Event List

Online Language Switch -> Chronologic Event List

What is done?

Chronologic Event List

A screen of the screen type Chronologic event list with all its system messages is translated.


Creating the CEL

Online Language Switch -> Chronologic Event List -> Creating the CEL

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Chronologic Event List | A screen of the screen type Chronologic event list is created.
 | A button is linked to a function Screen switch to the screen CEL.


CEL

Online Language Switch -> Chronologic Event List -> Creating the CEL -> CEL

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • In the Project Manager select Screen new from the context menu of the Screens.

    A “Screen_0” is automatically created and can be configured in the properties window.

  • Change the properties as shown in the screenshot below:

  • Select the screen type Chronologic event list.
  • Enter the name CEL.
  • Select Main_Frame as the frame.
  • Open the screen “CEL”.
  • Select Add template ... from the pulldown menu Control elements.

After you have selected a template, default elements are inserted in screen CEL automatically.


Function “Language change”

Online Language Switch -> Chronologic Event List -> Function “Language change”

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

language switch | The column headers of the CEL are translated.
Texts and buttons | The default elements of the CEL (texts and buttons) are linked to the according font and are translated.
Bitmap button | The two bitmap buttons with the flags and the functions Language change are copied to the screen CEL.


CEL administration

Online Language Switch -> Chronologic Event List -> Function “Language change” -> CEL administration

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the context menu of your project in the Project Manager.
  • Select CEL configuration, property page Entry in the list.

Here you have the possibility to translate the column headers for the CEL.

  • Change the properties as shown in the screenshot below:

  • Activate the entry Identification.
  • Add a “@” in front of all selected entries.

attention Attention

You can only switch the language of the “Identification” not that of the “Name”.

A variable is identified by its name. So you can use the same identification for several variables, but the names have to be unique in the project.


Texts and buttons

Online Language Switch -> Chronologic Event List -> Function “Language change” -> Texts and buttons

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the screen “CEL”.
  • Click on the text field of the CEL.
  • Under Representation/Font in the properties window select Text font.

info Info

Select the font Text font for all texts in the screen CEL.

Multi-selection is possible: Select the elements with the key combination Ctrl+A or Shift+mouse click.

  • For all the texts and buttons you use in the CEL enter a “@” in front of the their names in the properties window.

Example Example

Also translate the other buttons in the screen CEL (Sort, Filter, Print, Stop, Close).

Link the button font to them.

Update your language table.


Bitmap Button

Online Language Switch -> Chronologic Event List -> Function “Language change” -> Bitmap Button

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

The two bitmap buttons with the flags and the functions Language change are copied to the screen CEL.

  • In the Main_Screen select the bitmap buttons and copy them.
  • Under Representation/Font in the properties window select Text font.
  • Paste the bitmap buttons in the screen CEL (linked functions are also copied).


System messages

Online Language Switch -> Chronologic Event List -> System messages

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Function Screen switch | A button CEL is added to the button bar and is linked to the function Screen switch to the screen CEL.
Translating system messages | Add the system messages to the language table.


Function screen switch

Online Language Switch -> Chronologic Event List -> System messages -> Function screen switch

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

In order to be able to switch between the screens, we have to define “Screen switch” functions.

  • In the Project Manager select Function new from the context menu of the Functions.
  • Select the screen function Screen switch.
  • Select CEL as the linked screen.

In the screen Button_Bar we now create a button for the function Screen switch to the screen CEL:

  • Create a button (either as a new dynamic element or by copying the button Main Window).
  • Change the configuration of the button in the properties window.

The button text CEL should be translated.

  • Change the properties as shown in the screenshot below:

  • Select Button font under Representation/Font.
  • Under Representation/Text enter @CEL.
  • Under Runtime/Function select the function Screen switch to the screen CEL.

info Info

You can also link the function via Drag&Drop.


Translating system messages

Online Language Switch -> Chronologic Event List -> System messages -> Translating system messages

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

There are pre-defined keywords for all texts, that are used in the Runtime as defaults.

info Info

For an individual translation of the pre-defined keywords:

You will find an Excel file with the pre-defined keywords on the installation CE of the control system under Predefined/CEL keywords.

  • The texts to be translated have to be copied to the language table.

The principle of keyword translation

The table works with the principle of keywords, which are assigned to the according translations. These keywords are always indicated with a “@”.

Here it is true:

@Text

The whole text will be translated.

Text

This text will not be translated.

@Text

The text between the two “@” will be translated.

Here it is true: After an odd number of “@” the text will be translated (start to count at the beginning of the entry):

the text between the first and the second “@” is translated, the text between the second and the third “@” not!

info Info

A sequence of text elements that should be translated and such that should not be translated is possible. @The user@ Miller @is logged out.

@Text1@Text2@Text3

Text1 and text3 will be translated, text2 not.

info Info

For the entries in the language table the following is true: for each “@” a package is generated and these packages have to entered in the language table as single entries. Thus one entry per “@”!

@The user@ Miller @is logged out.

Two entries have to be added to the language table: @The user@ Miller @is logged out.

The new keyword also can be entered directly in the language table. Here it is true: In the language table the keywords are entered without “@” or the “@” is automatically removed.

info Info

For the language table the following is true: The pre-defined keyword is generated by the program and depends on the selected language of the Runtime. The language of the Runtime is set in the Editor or in the zenon6.ini under LANGUAGE=.

e.g.: In an English Runtime English keywords are used.

info Info

The button captions in the dialogs (e.g. OK, Cancel) depend on the settings of the operating system.


Runtime

Online Language Switch -> Chronologic Event List -> Runtime

What is done?

Runtime

The project is started in the Runtime.

info Info

The System Text Wizard can help you a lot in this part of defining the language change.


Alarms

Online Language Switch -> Alarms

What is done?

Alarm Information List

A screen of the screen type Alarm and its entries are translated.


Variable with limit

Online Language Switch -> Alarms -> Variable with limit

What is done?

Variable | A variable will be created.
 | Limits for the variable will be defined.


Variable

Online Language Switch -> Alarms -> Variable with limit -> Variable

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

A variable Fill level will be created.

  • In the Project Manager select Variable new from the context menu of the Variables.
  • Change the properties as shown in the screenshot below:

  • Enter the variable name Fill level.
  • Use the simulation driver.
  • Under Driver object type select PLC marker.
  • Under Data type select USINT.

Now limits are defined for the variable:

  • Open the properties window of the variable.
  • The context menu of the properties window allows you to add a new limit.

A new Limit[1] is created and can be configured.

  • Change the properties as shown in the screenshot below:

  • Set the Offset to 20.
  • Activate in CEL and as alarm.
  • Set the Set value to 1000.
  • As limit text enter @Tank nearly empty! (this text should be translated!)
  • Under Minimum / Maximum select Minimum.


Alarm list screen

Online Language Switch -> Alarms -> Alarm list screen

What is done?

Screen Alarm list | A screen of the screen type Alarm is created.
 | A button is linked to a function Screen switch to the screen AIL.
Dynamic element | A dynamic element Bar display is added to the screen AIL.


Screen

Online Language Switch -> Alarms -> Alarm list screen -> Screen

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  1. Create a new screen AML.
  2. Under General/Screen type in the properties window set the type to Alarm.
  3. Add a button AML to the screen Button-Bar.
  4. Link this button to a function Screen switch to the screen AML.
  5. Open the screen AML.
  6. In menu Control elements click on Add template.
  7. The dialog for selecting a template is opened.
  8. Select the desired template.
  9. The template is inserted.

  10. Now add a dynamic element Bargraph to the screen of type AML.
  11. Link the bar graph to the variable Fill level.


Alarm list

Online Language Switch -> Alarms -> Alarm list

What is done?

Alarms administration | The column headers of the alarm list are translated.
Texts and buttons | The default elements of the alarm list (texts and buttons) are linked to the according font and are translated.
Language table | The new entries are added to the language table.
Bitmap button | The two bitmap buttons with the flags and the functions Language change are copied to the screen AIL.


Alarms administration

Online Language Switch -> Alarms -> Alarm list -> Alarms administration

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the context menu of your project and select Alarm administration.
  • Add a @ in front of all active entries on the property page Entry in the list.


Texts and buttons

Online Language Switch -> Alarms -> Alarm list -> Texts and buttons

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Link the texts and buttons to the according fonts.
  • For all the texts and buttons enter a “@” in front of their names in the properties window.


Language table

Online Language Switch -> Alarms -> Alarm list -> Language table

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Update the entries in the language table.
    e.g.


Bitmap Button

Online Language Switch -> Alarms -> Alarm list -> Bitmap Button

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Copy the bitmap buttons with the flags and the functions Language change to your screen AIL.


Runtime

Online Language Switch -> Alarms -> Runtime

What is done?

Runtime

Starts the Runtime.


Runtime

Online Language Switch -> Alarms -> Runtime -> Runtime

  • Start the Runtime.

info Info

Now you are able to create alarm and chronologic event lists and to switch their language in the Runtime.


Technical units

Online Language Switch -> Technical units

What is done?

Units

Along with switching the language the value of a variable should be converted from one technical unit to another.


Reports

Online Language Switch -> Technical units -> Reports

What is done?

Language table | The column German is added to the language table.
Report | Two Reports are created: “Liters” and “Gallons”.
 | The formulas for the conversion are defined in reports.


Units

Online Language Switch -> Technical units -> Reports -> Units

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

As values like length, weight, temperature or capacity in different countries are measured in different units, you have to care for that, when using the language change.

Conversion formulas can be used for the values of variables, so that along with the language change the units are converted.

attention Attention

Does not work under Windows CE.

The conversion is defined in the Report Generator, which is not available under Windows CE.


Language table

Online Language Switch -> Technical units -> Reports -> Language table

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Create a new language table German.
  • Add the German translations for the entries (Fill level, Füllstand, etc.).
  • Also add an entry Gallons and in German translate it with Liter.
  • Create a new function Language change that switches to German.


Report

Online Language Switch -> Technical units -> Reports -> Report

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Open the variable Fill level, which was created in project 4.
  • Under Description/Unit in the properties window enter @Gallons.
  • In the Project Manager create two new Reports.
  • Enter the names Liters and Gallons.

Doubleclicking a report in the detailview of the Project Manager opens it.

The report Liters.xrs has to be defined as shown below:

  • Click on the cell A1 and open the context menu.
  • Select Functions.
  • Under Functions select variablerw (doubleclick).
  • Press the button Variable.
  • Select Fill level (either with a double click or with Add).

This variable has been created in project 4.

  • Under Parameter select mmin (doubleclick).

The following text is displayed: =variablerw(Fill level,mmin,0)

  • Click on the cell A2.
  • Enter the same function as in A1, but this time select mmax.

The following text is displayed: =variablerw(Fill level,mmax,255)

Example Example

Define the report Gallons.xrs in the same way. Here you have to use the formula:

Gallons = Liter * 0.26

So the minimum is 0 and the maximum is 66.3 (=255*0.26).


Creating a screen

Online Language Switch -> Technical units -> Creating a screen

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

What is done?

Screen | A screen Fill level will be created.
 | A function Screen switch to this screen will be created.
 | This function will be linked to a button.


Screen

Online Language Switch -> Technical units -> Creating a screen -> Screen

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com
  • Create a new frame Fill level: left=210, top=27, right=1024, bottom=676.
  • Create a new screen Fill level.
  • Create a function Screen switch to the screen Fill level.
  • Add a text button to the screen Button_Bar.
  • Link the function to the text button.

Example Example

Add the title Fill level to the screen.

(Vector element Text, Text font, text to translate)

  • Add a dynamic element Numerical value to your screen Fill level.
  • Link the “Numerical value to the variable Fill level.
  • In the language table translate the English word Gallons to German Liter.
  • Add a vector element Text to your screen Fill level.
  • Link it to the “Text font”.
  • Under Representation/Text enter @Fill level.
  • Create two bitmap buttons.
  • Link these buttons to the English and the Austrian flag.

Example Example

Add another button to the screen and link it to the function Screen switch to the screen Main_Screen. Name it Back and add this text to the language table.


Execute report

Online Language Switch -> Technical units -> Execute report

What is done?

Scripts

The functions Language change and Execute report are combined in a script.


Scripts

Online Language Switch -> Technical units -> Execute report -> Scripts

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

info Info

Scripts are used to execute several functions.

Our bitmap buttons with the flags now should not only switch the language, but also convert the technical units.

So two functions have to be linked to a button. This can be done by using a script.

  • First create a new function Execute report.
  • Select Liters.xrs.

Example Example

Link another function to the Report Gallons.xrs.

  • In the Project Manager create a new script under Functions/Scripts.
  • Enter the name Liters.
  • Open the context menu of Liters in the detailview of the Project Manager.
  • Link the functions Language change to German and Execute report – Liter.xrs to the script Liters.

Example Example

Create a script Gallons that contains the two functions Language change to English and Execute report – Gallons.xrs.

Example Example

Create two new functions Script: execute for the scripts Gallons and Liters. Link the functions to the according bitmap buttons.

  • Open the screen Main_Screen and link the scripts to the according flags.


Runtime

Online Language Switch -> Technical units -> Runtime

What is done?

Runtime

The project is tested in Runtime mode.

  • Start the Runtime.
  • On clicking the Austrian flag the values of the fill level is converted from Gallons to Liters and the display of the unit is switched.

info Info

You now are able to convert the technical units of values and to switch the units along with the language. You got to know the basics on working with reports and know, what scripts are used for.


wizards

Online Language Switch -> wizards


Paths for languages

Online Language Switch -> Paths for languages


Language switch for Runtime help / list path / media files

Online Language Switch -> Paths for languages -> Language switch for Runtime help / list path / media files

Previous chapter Next chapter Show all Show all Hide all Hide all
© Ing. Punzenberger COPA-DATA GmbH. For any questions regarding the documentation please contact: documentation@copadata.com

In the function “Language change” the according folder can be selected:

If the languages of Runtime help, list and media paths should be switched, be aware of the following: The files must have the same name in the different languages, but they are stored in different folders.


Test questions for self-control

Online Language Switch -> Test questions for self-control

Which character has to be added to texts for switching the language?


Tasks for self-control

Online Language Switch -> Tasks for self-control

Example Example

Create a screen with texts and buttons and translate it to Arabian.

Example Example

Along with switching the language the value of a variable should be converted from degrees Fahrenheit to degrees Celsius.

The formula for the calculation is:

Degrees Fahrenheit=(Degrees Centigrade*1.8)+32.

Example Example

Create a screen of the window class Login and translate it to a language of your choice.