RSTechEd05 Lab - Language Switching.doc
-
Upload
rahilshah100 -
Category
Documents
-
view
219 -
download
0
Transcript of RSTechEd05 Lab - Language Switching.doc
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
1/36
OP03 Implementing PanelView Plus &
VersaView CE with RSView MachineEdition
anguage Switching
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
2/36
!""" #our la$ title goes herePresenter:
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
3/36
OP03 Language Switching
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 EastAsian Languages.........................................................!
"reating Language Switch Buttons # Adding Additional Languages.................................... .$
E%porting the te%t strings.......................................................................................................... &'
Setting up (ultilanguage Support for Alar)s.........................................................................&*
+)porting ,ranslated Language ,e%t -iles to the Application................................................22
Spanish......................................................................................................................................... 22
German......................................................................................................................................... 23
rench........................................................................................................................................... 24
C!ech............................................................................................................................................25
Chinese.........................................................................................................................................2"
,esting the Application...............................................................................................................2*
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 1 of 34
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
4/36
Before you begin
)hen supporting an application (here the operators* engineers an+ fiel+ support staff spea'
+ifferent languages* it is con,enient to s(itch languages (hile the application is running.
#S-ie(s language s(itching feature pro,i+es the abilit/ to set up multiple languages for an
application an+ s(itch application languages +/namicall/ at run time. 0sers can specif/ a
language for the application at startup* an+ change the language at run time using a language
s(itch button.
About this lab
1n this lab* /ou (ill learn ho( to +o language s(itching on the main screen graphic +ispla/ to
allo( s(itching bet(een $nglish an+ Spanish. Then /ou (ill import a++itional languages such as
German* C!ech* Spanish* rench an+ Chinese to allo( the (hole application to s(itch among all
these languages +uring runtime. ou (ill use the AC$ A1T G application for this lab.
This lab ta'es appro6imatel/ 4 minutes to complete.
Tools !rere"uisites
#S-ie( achine $+ition Stu+io 4.
$6isting #S-ie( $ application A"(E aint (fg "o)plete
Language te6t files in "/0O130A"(E0Languages
7289 #A an+ 7289 1nternal Storage Car+ require+ on the -ersa-ie( C$ an+ anel-ie(
lus terminals
OP03 Language Switching
# of 34 #STech$% 25 #oc'(ell Soft(are
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
5/36
O!ening the A!!lication in $S%iew Stu&io
7. Start #S-ie( Stu+io.
rom the Startmenu* select rogra)s Rocwell Software RSView Enterprise RSView
Studio or rogra)s RSView Studioas sho(n belo(.
2. )hen /ou are prompt to log on to actor/Tal'. ollo( steps a to b. 1f /ou +on:t see the
follo(ing +ialog bo6* s'ip to Step 3.
3. )e (ill buil+ the language s(itching features on the AC$ A1T G application. As a
result* the base language of this application is $nglish.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 3 of 34
b. Clic' O4.
a. 0ser ;labuser< for 5serna)ean+ ;rocwell< forassword.
d. Clic' Open.
c. Select A"(E A+6, (-7"o)plete. a'e sure English isselecte+ for Language.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
6/36
Configuring Local Co''unications
The local tab in Communication Setup reflects the ,ie( of the topolog/ from the #SLin6
$nterprise ser,er on the +e,elopment computer. or this application* the +e,elopment computer
(ill be communicating to the ControlLogi6 L55 processor ,ia $thernet.
7. ap the shortcut to the ControlLogi6 L55 processor.
OP03 Language Switching
4 of 34 #STech$% 25 #oc'(ell Soft(are
b. Select the LO7+8shortcut.
a. a'e sure Localtab isselecte+.
c. 9ro(se to an+ select theControlLogi6 L55 processor. 0sethe 1 a++ress assigne+ b/ /ourlab instructor.
d. Clic' Apply.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
7/36
Configuring Target Co''unications
7. Change the 1 a++ress of the $9T mo+ule.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are ( of 34
a. a'e sure ,argettabis selecte+.
b. #ight clic' on the E6B,mo+ule an+ select roperties.
c. ut in the 1 a++ress assigne+ to/ou b/ /our lab instructor.
d. Clic' O4.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
8/36
OP03 Language Switching
) of 34 #STech$% 25 #oc'(ell Soft(are
e. Select the LO7+8shortcut.
f. Select the ControlLogi6 L55processor.
g. Clic' Apply. h. Clic' O4.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
9/36
Language Switching Su!!ort for *ast+Asian Languages
To enable language s(itching support for $ast=Asian languages such as Chinese* >apanese* an+
?orean* proper fonts nee+ to be installe+ on the C an+ the anel-ie( lus@-ersa-ie( C$
terminals. or the purpose of this lab* both the C an+ the -ersa-ie( C$ terminals ha,e been
loa+e+ (ith Chinese fonts.
6ote/ ,he following ser9es as a guideline for installing fonts. :ou do not need to do any of
the steps in this section.
n the C* $ast=Asian Languages fonts can be installe+ from the ;indows Regional and
Language Optionsfrom "ontrol anel.
The fonts (ill be installe+ in the "/0;+6
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
10/36
6ote/ ,he following ser9es as a guideline for installing fonts. :ou do not need to do any of
these steps.
The anel-ie( lus@-ersa-ie( C$ terminals are not pre=loa+e+ (ith $ast=Asians language fonts.
As a result* /ou nee+ to cop/ the +esire+ fonts onto the terminals. Since the $ast=Asians
language font files are usuall/ large in si!e SimBei Chinese font file is 79D* it:s recommen+e+
that the terminals ha,e at least &2*(B RA(an+ a &2*(B internal storage card.
ou can either cop/ the fonts manuall/ to0Storage "ard0-ontson the terminal using a compact
flash car+ or using the Transfer 0tilit/ from #S-ie( Stu+io.
The font files (ill be copie+ to0Storage "ard0-onts.
nce all the necessar/ fonts are installe+* /ou can +e,elop /our application to s(itch to +ifferent
$ast=Asians languages.
OP03 Language Switching
- of 34 #STech$% 25 #oc'(ell Soft(are
a. a,igate to the
"/0;+6
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
11/36
Creating Language Switch Buttons A&&ing A&&itional
Languages
To enable language s(itching functionalit/* /ou nee+ to create Language Switch Buttons an+
a++ a++itional languages into the application.
7. Let:s first a++ the a++itional languages into the application.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are . of 34
b. 1n the Language "onfiguratione+itor* select Add.
c. ic' Spanish =+nternational Sort>for Spanish. Clic' O4.
a. n the Tool bar* selectLanguages from ,ools.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
12/36
OP03 Language Switching
10 of 34 #STech$% 25 #oc'(ell Soft(are
d. 1n the Language "onfiguratione+itor* select Add.
e. ic' 7er)an =7er)any> forGerman. Clic' O4.
f. 1n the Language "onfiguratione+itor* select Add.
g. ic' -rench =-rance> for rench.Clic' O4.
h. 1n the Language "onfiguration
e+itor* select Add.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
13/36
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 11 of 34
i. ic' "?ech. Clic' O4.
l. o( /ou ha,e a++e+ the a++itional
languages into /our application. 6otethat you can add up to 21 languages toan application
@. 1n the Language "onfiguration
e+itor* select Add.
. ic' "hinese =R">. Clic' O4.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
14/36
2. Creating language s(itch buttons. %ue to time limit of the lab* /ou (ill nee+ to import a ne(
(ain Screen +ispla/ that ha,e fi,e language s(itch buttons create+ for English -rench
7er)an Spanish "?ech and "hinese.
7. 1mport the ne( (ain Screen +ispla/. "lose (ain Screen display if you ha9e it opened .
2. pen the (ain Screen +ispla/. The si6 blue language s(itch buttons are positione+ at the
left han+ si+e of the +ispla/.
OP03 Language Switching
1# of 34 #STech$% 25 #oc'(ell Soft(are
a. #ight clic' on
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
15/36
6ote/ Steps a and b ser9es as a guideline for creating language switch buttons. :ou do
not need to do steps a and b.
a. Create a language button.
b. Assign a language to the language s(itch button an+ change the caption. or e6ample* for
the $nglish language s(itch buttonE
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 13 of 34
a. Select Language Switch
Button from Ob@ects Ad9anced. %ra( a rectangleon the +ispla/ to create thebutton.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
16/36
2. Let:s ta'e a loo' at the string +ispla/ that sho(s the current language for the application
+uring runtime.
otice that it has the follo(ing e6pression into the E%pression Editor.
if CurrentLanguage D FF en=0SD Then $nglish
$lse if CurrentLanguage D FF es=$SD Then $spaHol
$lse if CurrentLanguage D FF +e=%$D Then %eutsch
$lse if CurrentLanguage D FF fr=#D Then Le franIais
$lse if CurrentLanguage D FF cs=CJD Then ces'/
OP03 Language Switching
14 of 34 #STech$% 25 #oc'(ell Soft(are
a. %ouble clic' on the String
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
17/36
$lse if CurrentLanguage D FF !h=CD Then chineseTag
$lse error
"urrentLanguage= >returns a string containing the #C7K"" name of the current runtime
language. or e6ample* if the current language is Chinese !h=CD* then the ,alue of the
B1 memor/ tag chineseTagD (hich states ;< (ill be +ispla/e+. The reason a tag is
use+ instea+ of the actual Chinese characters is because the e6pression e+itor +oes not
support 0nico+e characters.
6ote/The #C7K"" co+e is a stan+ar+ (a/ of representing a language using the format
languageco+e2M=countr/@regionco+e2M* (here languageco+e2M is a lo(ercase t(o=
letter co+e an+ countr/@regionco+e2M is an uppercase t(o=letter co+e. or e6ample* 0.S.
$nglish is en=0S. The #C7K"" name is not case sensiti,e.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 1( of 34
d. Clic' on 7eneraltab. otice that6Si)Sun font has been selecte+ to+ispla/ Chinese characters correctl/.Clic' O4.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
18/36
*/!orting the te/t strings
ou are no( rea+/ to e6port the te6t strings from the application to an e+itable file. )e (ill sho(
/ou ho( an e6porte+ language string file loo's li'e.
7. Launch the Language "onfiguration Editor from ,ools Lanuages.
2. $6port the te6t strings to an e+itable file.
3. 1n the String +)port E%port ;i?ard* clic' -inishto e6port the strings to the +efault locationE
"/0
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
19/36
4. 1n ;indows E%plorer* na,igate to "/0
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
20/36
Setting u! ulti+language Su!!ort for Alar's
Currentl/* #S-ie( Stu+io achine $+ition 4. onl/ supports language s(itching in graphic
+ispla/s. Language s(itching support for alar)sinfor)ation )essagesan+ local )essages
(ill be release+ in the future. 1n the meantime* there are (or'aroun+s to allo( this operation.
)e (ill sho( /ou a (or'aroun+ for Alarms. Similar operation can be applie+ to information
messages an+ local messages.
7. 1mport the pre=configure+ multi=language alarms.
OP03 Language Switching
1- of 34 #STech$% 25 #oc'(ell Soft(are
a.#ight clic' on Alar) Setupan+ select+)port and E%portto launch the Alar)+)port E%port ;i?ard.
b.Select +)port alar) configuration intoapplication. Clic' 6e%t.
c.Select 6o (hen as'e+ (hether /ou (antto bac'up the e6isting alarm configuration.Clic' 6e%t.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
21/36
ou ha,e no( importe+ the pre=configure+ multi=language alarms into the application.
2. Ta'e a loo' at the multi=language alarms. This application has " maOor alarmsE the first three
triggers are for (hen the blue red and yellow tans are e)ptyP the last three triggers are for
when the color tans are al)ost e)pty. )e (ill utili!e the CurrentLanguageD function to
trigger the appropriate alarm accor+ing to the language the application is currentl/ in +uring
runtime.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 1. of 34
d.Clic' to select the file.
e.a,igate to"/0O130A"(E0Languages .
f.Select LanguagesCAlar)s.%)l alarmconfiguration file. Clic' Open.
g.Clic' -inish.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
22/36
Alarm triggers
This trigger chec's (hen the blue tan' becomes empt/ an+ has +ifferent trigger ,alues
+epen+ing on the current language of the application.
if CurrentLanguage D FF en=0SD A% QEERLG1rogramEainrogram.9lueUTan'.illULe,el.ACCV FF D D
Then 7
$lse if CurrentLanguage D FF es=$SD A% QEERLG1rogramEainrogram.9lueUTan'.illULe,el.ACCV FF D D
Then 77
$lse if CurrentLanguage D FF +e=%$D A% QEERLG1rogramEainrogram.9lueUTan'.illULe,el.ACCV FF D D
Then 27
$lse if CurrentLanguage D FF fr=#D A% QEERLG1rogramEainrogram.9lueUTan'.illULe,el.ACCV FF D D
Then 37$lse if CurrentLanguage D FF cs=CJD A% QEERLG1rogramEainrogram.9lueUTan'.illULe,el.ACCV FF D D
Then 47
$lse if CurrentLanguage D FF !h=CD A% QEERLG1rogramEainrogram.9lueUTan'.illULe,el.ACCV FF D D
Then 57
$lse
OP03 Language Switching
#0 of 34 #STech$% 25 #oc'(ell Soft(are
a.%ouble clic' on Alar) Setuptolaunch the Alar) Setup Editor.
b.Select the first trigger W chec's(hen the blue tan' is empt/. Clic'Edit.
c.Select un+er E%prntolaunch E%pression Editor.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
23/36
Alarm messages
The first si6 alarm messages use the same alarm trigger that chec's (hen the blue tan'
becomes empt/. %ifferent alarm messages (oul+ be triggere+ +epen+ing on the ,alue of the
alarm trigger. or e6ample* (hen the blue tan' is empt/ an+ the current language is Spanish* the
alarm trigger:s ,alue becomes 77 an+ thus the alarm message ;$l tanque a!ul estX ,acYo< (oul+
be +ispla/e+.
Similarl/* the same concept applies to the remaining alarm triggers.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are #1 of 34
d.Clic' "ancelto close theE%pression Editor.
f.Select the (essagestab.
e.Clic' "ancelto close the,rigger Editor.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
24/36
'!orting Translate& Language Te/t 2iles to the A!!lication
o( /ou ha,e learne+ all the important steps to +o language s(itching in #S-ie( achine
$+ition applications. )e ha,e prepare+ te6t files (hich ha,e alrea+/ been translate+ full/ into
Spanish* German* rench* C!ech an+ Chinese. These te6t files are sa,e+ in
"/0O130A"(E0Languages fol+er. ollo( the follo(ing steps to s(itch the (hole application
into +ifferent languages +uring runtime.
7. 1n #S-ie( Stu+io* launch Language "onfiguration Editor from ,ools Languages.
S!anish
OP03 Language Switching
## of 34 #STech$% 25 #oc'(ell Soft(are
a.Select Spanishan+Clic' +)port
b.Clic' on to bro(sethe te6t file.
c.a,igate to "/0O130A"(E0Languages .
d.Select A"(E A+6, (-7 "o)pleteCA"(E
A+6, (-7 "o)pleteCesCES.Clic' Open.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
25/36
er'an
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are #3 of 34
d.Clic' -inish.
a.Select 7er)anan+Clic' +)port
b.Clic' on to bro(se
the te6t file.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
26/36
2rench
OP03 Language Switching
#4 of 34 #STech$% 25 #oc'(ell Soft(are
c.a,igate to "/0O130A"(E0Languages .
d.Clic' -inish.
d.Select A"(E A+6, (-7 "o)pleteCA"(EA+6, (-7 "o)pleteCdeC
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
27/36
Cech
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are #( of 34
c.a,igate to "/0O130A"(E0Languages .
d.Clic' -inish.
d.Select A"(E A+6, (-7 "o)pleteCA"(EA+6, (-7 "o)pleteCfrC-R.
Clic' Open.
a.Select "?echan+ Clic'+)port
b.Clic' on to bro(sethe te6t file.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
28/36
Chinese
OP03 Language Switching
#) of 34 #STech$% 25 #oc'(ell Soft(are
c.a,igate to "/0O130A"(E0Languages .
d.Clic' -inish.
d.Select A"(E A+6, (-7 "o)pleteCA"(EA+6, (-7 "o)pleteCcsC"D.
Clic' Open.
a.Select "hinesean+Clic' +)port
b.Clic' on to bro(sethe te6t file.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
29/36
2. Clic' O4to close the Language "onfiguration Editor.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are #, of 34
c.a,igate to "/0O130A"(E0Languages .
d.Select A"(E A+6, (-7 "o)pleteCA"(EA+6, (-7 "o)pleteC?hC"6.
Clic' Open.
d.Clic' -inish.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
30/36
Testing the A!!lication
Running on
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
31/36
Running on VersaView "E
7. Create the runtime application b/ going to Application "reate Runti)e Application.
2. Sa,e the AC$ A1T G Complete.mer file in the +efault #untime location.
3. )hen it has finishe+ compiling the runtime file* launch the -ile ,ransfer 5tility from the tool
bar.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are #. of 34
a.a'e sure Runti)e .1 Application=F.)er>file t/pe is selecte+. Clic' Sa9e.Sa/:esto replace if as'e+.
b.Chec' all languages. a'e sureEnglishis selecte+ as the initialruntime application language. Clic'-inish.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
32/36
4. 9ro(se the runtime file.
5. The file is no( being transferre+ to the -[@--C$.
OP03 Language Switching
30 of 34 #STech$% 25 #oc'(ell Soft(are
a. Clic' on to bro(se theruntime file.
b. Select A"(E (A+6, (-7"o)plete runtime file an+ clic'Open.
c. 9ro(se for the -@--C$assigne+ to /ou.
d. Clic'
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
33/36
Linking Fonts
To ,ie( $ast=Asians language fonts properl/ on the C$ terminals* (e nee+ to lin' the fonts to the
correspon+ing $ast=Asians fonts. or e6ample* this application is +e,elope+ using Arial font. )e
nee+ to lin' the Arial font to 6Si)SunChinese font to ,ie( Chinese on the terminal. As
mentione+ in the Language S(itching Support for $ast=Asians Languages* the SimSun font has
been copie+ onto the -ersa-ie( C$ terminals.
7. n /our -ersa-ie( C$ terminal* lin' the font in ,er)inal Settings.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 31 of 34
a. Clic' ,er)inal Settings.
b. Select -ont Lining.
Clic' .
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
34/36
OP03 Language Switching
3# of 34 #STech$% 25 #oc'(ell Soft(are
c. Select Arial. Clic' ShowLins.
d. otice that there is no lin' setfor Arial. Clic' Edit Lin.
e. Select 6Si)Sun. Clic'
Add -ont.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
35/36
2. Clic' on "loseuntil /ou are bac' to the #S-ie( $ Station configuration screen.Clic' Load Applicationan+ select A"(E A+6, (-7 "o)plete. Then clic' Load. Clic'
:es to replace the e6isting communication settings.
3. Clic' Run Application to start the roOect.
ou ha,e no( finishe+ the Language S(itching lab.
OP03 Language Switching
#STech$% 25 #oc'(ell Soft(are 33 of 34
f. o( /ou ha,e lin'e+ the Arial font(ith the SimSun font. Clic' "lose.
-
7/21/2019 RSTechEd05 Lab - Language Switching.doc
36/36
5otes