background image
<< Internationalization - Testing applications with single-byte international characters | Internationalization - Load string variables with the localized strings >>
Internationalization - Internationalizing tags
<< Internationalization - Testing applications with single-byte international characters | Internationalization - Load string variables with the localized strings >>
User's Guide
283
14 S
UPPORTING
I
NTERNATIONALIZED
A
PPLICATIONS
Internationalizing tags
MenuItem New
tag sNew
MenuItem Open
tag sOpen
MenuItem Save
tag sSave
MenuItem SaveAs
tag sSaveAs
MenuItem Exit
tag sExit
// omitted menu declarations
window DialogBox Find
tag sFind
parent TextEditor
StaticText WhatText
tag sFindWhatText
TextField What
tag sFindWhat
CheckBox CaseSensitive
tag sCaseSensitive
RadioList Direction
tag sDirection
PushButton FindNext
tag sFindNext
PushButton Cancel
tag sCancel
SilkTest retrieves the value for each
STRING
variable using the language
index. You define the index and initialize the
STRING
variables as described
in the next two sections.
Create an enumerated
type for the languages
You should create an enumerated type like the one shown below which
defines the set of possible languages into which your application can be
localized. Although the values of the enumerated type can be any meaningful
set of strings, you might want to use the two-letter International Standard IS
639 language codes, as shown in this example:
type LANGUAGETYPE is enum
// uses the 2-letter IS 639 language code.
LT_DE // German
LT_EN // English
LT_ES // Spanish
Use current language
as index
Then, create and initialize a constant or a variable that specifies the language
that you want to test when you run your scripts. For example, to test the
English version of an application, you can create and initialize this constant: