Rockwell Automation FactoryTalk View Machine Edition Users Guide User Manual

Page 493

Advertising
background image

23

Use expressions

23-15

• •

Language switching alarm, information, and local messages in
FactoryTalk View ME Station 4.00

FactoryTalk View 5.00 and later provides direct support for switching message languages
at run time.

For applications that will run in FactoryTalk View ME Station version 4.00, use the
CurrentLanguage( ) expression function to specify message offsets in the information
message file. In the file, divide your messages into sections for each language. To do this,
set up trigger value offsets for series of messages in the Alarm Setup editor, information
message files, and local message files.

Export the text strings in the Alarm Setup editor and message files for translation. Then
paste the translated strings into the editor and original message files, and assign each
string the correct trigger value. For information about exporting text for translation, see
Chapter 12.

Example: Set up information messages in multiple languages

This example shows how to generate English, French, or German information messages at
run time in an FactoryTalk View ME Station 4.00 application, depending on which
language the application is using.

1. Create a tag called Information_messages that will generate trigger values of 11 to 20

for different conditions that require information messages.

2. Create an information message file.

3. Create English messages for trigger values 11 to 20.

Tip: Messages are sorted alphanumerically in the Excel spreadsheet or Unicode text
file created for translation. Therefore, numbers 2 through 9 would appear after 10, 11,
12, and so on. To keep your messages in order in the translation file, begin the first
series of numbers at 11.

4. Create French messages for trigger values 21 to 30.

5. Create German messages for trigger values 31 to 40.

6. Assign this expression to the Value connection in the Information Setup editor:

If CurrentLanguage( )=”en-US” then Information_messages

Else If CurrentLanguage( )=”fr-FR” then Information_messages + 10

Else Information_messages + 20

Advertising