Professional Documents
Culture Documents
Contents
Before you begin.......................................................................................................................... 2
About this lab.................................................................................................................................. 2
Tools & prerequisites....................................................................................................................... 2
Opening the Application in RSView Studio................................................................................3
Configuring Local Communications................................................................................................ 4
Configuring Target Communications............................................................................................... 5
Language Switching Support for East-Asian Languages.........................................................7
Creating Language Switch Buttons & Adding Additional Languages.....................................9
Exporting the text strings.......................................................................................................... 16
Setting up Multi-language Support for Alarms.........................................................................18
Importing Translated Language Text Files to the Application................................................22
Spanish......................................................................................................................................... 22
German......................................................................................................................................... 23
French........................................................................................................................................... 24
Czech............................................................................................................................................ 25
Chinese......................................................................................................................................... 26
Testing the Application............................................................................................................... 28
1 of 34
2 of 34
2. When you are prompt to log on to FactoryTalk. Follow steps a to b. If you dont see the
following dialog box, skip to Step 3.
a. User labuser for User
name and rockwell for
Password.
b. Click OK.
3. We will build the language switching features on the ACME PAINT MFG application. As a
result, the base language of this application is English.
c. Select ACME PAINT MFG
Complete. Make sure English is
selected for Language.
d. Click Open.
3 of 34
d. Click Apply.
4 of 34
d. Click OK.
5 of 34
g. Click Apply.
6 of 34
h. Click OK.
The fonts will be installed in the C:\WINDOWS\Fonts folder. For example, the SimHei and
SimSun fonts are used for Chinese.
7 of 34
Note: The following serves as a guideline for installing fonts. You do not need to do any of
these steps.
The PanelView Plus/VersaView CE terminals are not pre-loaded with East-Asians language fonts.
As a result, you need to copy the desired fonts onto the terminals. Since the East-Asians
language font files are usually large in size (SimHei Chinese font file is 10MB), its recommended
that the terminals have at least 128MB RAM and a 128MB internal storage card.
You can either copy the fonts manually to \Storage Card\Fonts on the terminal using a compact
flash card or using the Transfer Utility from RSView Studio.
a. Navigate to the
C:\WINDOWS\Fonts folder.
8 of 34
9 of 34
10 of 34
11 of 34
2. Creating language switch buttons. Due to time limit of the lab, you will need to import a new
Main Screen display that have five language switch buttons created for English, French,
German, Spanish, Czech and Chinese.
1. Import the new Main Screen display. Close Main Screen display if you have it opened.
a. Right click on Displays and
select Add Component Into
Application.
b. Navigate to
C:\OP03\ACME\Languages.
2. Open the Main Screen display. The six blue language switch buttons are positioned at the
left hand side of the display.
12 of 34
Note: Steps a and b serves as a guideline for creating language switch buttons. You do
not need to do steps a and b.
a. Create a language button.
b. Assign a language to the language switch button and change the caption. For example, for
the English language switch button:
13 of 34
2. Lets take a look at the string display that shows the current language for the application
during runtime.
Notice that it has the following expression into the Expression Editor.
if (CurrentLanguage( ) == "en-US") Then "English"
Else if (CurrentLanguage( ) == "es-ES") Then "Espaol"
Else if (CurrentLanguage( ) == "de-DE") Then "Deutsch"
Else if (CurrentLanguage( ) == "fr-FR") Then "Le franais"
Else if (CurrentLanguage( ) == "cs-CZ") Then "cesky"
14 of 34
15 of 34
3. In the String Import Export Wizard, click Finish to export the strings to the default location:
C:\Documents and Settings\All Users\Documents\RSView Enterprise\Strings
16 of 34
17 of 34
18 of 34
d. Click
e. Navigate to
C:\OP03\ACME\Languages.
g. Click Finish.
You have now imported the pre-configured multi-language alarms into the application.
2. Take a look at the multi-language alarms. This application has 6 major alarms: the first three
triggers are for when the blue, red and yellow tanks are empty; the last three triggers are for
when the color tanks are almost empty. We will utilize the CurrentLanguage() function to
trigger the appropriate alarm according to the language the application is currently in during
runtime.
OP03 Language Switching
RSTechED 2005 Rockwell Software
19 of 34
Alarm triggers
c. Select
under Exprn to
launch Expression Editor.
This trigger checks when the blue tank becomes empty and has different trigger values
depending on the current language of the application.
if ((CurrentLanguage( ) == "en-US") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 1
Else if ((CurrentLanguage( ) == "es-ES") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 101
Else if ((CurrentLanguage( ) == "de-DE") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 201
Else if ((CurrentLanguage( ) == "fr-FR") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 301
Else if ((CurrentLanguage( ) == "cs-CZ") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 401
Else if ((CurrentLanguage( ) == "zh-CN") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 501
Else 0
20 of 34
Alarm messages
The first six alarm messages use the same alarm trigger that checks when the blue tank
becomes empty. Different alarm messages would be triggered depending on the value of the
alarm trigger. For example, when the blue tank is empty and the current language is Spanish, the
alarm triggers value becomes 101 and thus the alarm message El tanque azul est vaco would
be displayed.
Similarly, the same concept applies to the remaining alarm triggers.
21 of 34
Spanish
a. Select Spanish and
Click Import
b. Click on
the text file.
to browse
c. Navigate to C:\OP03\ACME\Languages.
22 of 34
d. Click Finish.
German
a. Select German and
Click Import
b. Click on
the text file.
to browse
23 of 34
c. Navigate to C:\OP03\ACME\Languages.
d. Click Finish.
French
a. Select French and
Click Import
b. Click on
the text file.
24 of 34
to browse
c. Navigate to C:\OP03\ACME\Languages.
d. Click Finish.
Czech
a. Select Czech and Click
Import
b. Click on
the text file.
to browse
25 of 34
c. Navigate to C:\OP03\ACME\Languages.
d. Click Finish.
Chinese
a. Select Chinese and
Click Import
b. Click on
the text file.
26 of 34
to browse
c. Navigate to C:\OP03\ACME\Languages.
d. Click Finish.
2. Click OK to close the Language Configuration Editor.
27 of 34
2. Specify that you want to include all the languages in the runtime application.
c. Click Finish.
3. Viola! Your multi-language application is done! Switch to different languages and navigate to
different displays to see the effect of this awesome language switching feature.
28 of 34
Running on VersaView CE
1. Create the runtime application by going to Application > Create Runtime Application.
2. Save the ACME PAINT MFG Complete.mer file in the default Runtime location.
3. When it has finished compiling the runtime file, launch the File Transfer Utility from the tool
bar.
29 of 34
to browse the
d. Click Download.
30 of 34
Linking Fonts
To view East-Asians language fonts properly on the CE terminals, we need to link the fonts to the
corresponding East-Asians fonts. For example, this application is developed using Arial font. We
need to link the Arial font to NSimSun Chinese font to view Chinese on the terminal. As
mentioned in the Language Switching Support for East-Asians Languages, the NSimSun font has
been copied onto the VersaView CE terminals.
1. On your VersaView CE terminal, link the font in Terminal Settings.
31 of 34
32 of 34
2. Click on Close until you are back to the RSView ME Station configuration screen.
Click Load Application and select ACME PAINT MFG Complete. Then click Load. Click
Yes to replace the existing communication settings.
3. Click Run Application to start the Project.
You have now finished the Language Switching lab.
33 of 34
Notes
34 of 34