background image
<< Supporting Internationalized Applications | Internationalization - Internationalizing tags >>
Internationalization - Testing applications with single-byte international characters
<< Supporting Internationalized Applications | Internationalization - Internationalizing tags >>
282
User's Guide
14 S
UPPORTING
I
NTERNATIONALIZED
A
PPLICATIONS
Testing applications with single-byte international characters
Testing applications with single-byte international characters
To test applications using single-byte international character sets you must
manually add information to your partner.ini file. Add the following entry to
partner.ini:
[RecordOptions]
InternationalKeyboard=TRUE
With this change, the hotkey for all recording dialogs becomes Ctrl+Shift
instead of Ctrl+Alt.
Internationalizing tags
If your application is localized into multiple languages, then the captions and
labels upon which SilkTest bases the tags it records are valid only for the
localized version you ran when recording your window declarations.
One alternative is to use index numbers for the tags instead of the caption/
label. However, this approach has the drawback that you are not able to verify
that the labels are correct when you are testing your application's GUI
objects.
To make your declarations valid for all localized versions, one alternative is:
1
Replace every tag in your declarations with a
STRING
variable, if the tag
would otherwise be constructed from a caption or label.
2
Create an enumerated type of the possible languages. You use a variable
of this new enumerated type as an index into the
STRING
variable.
3
Assign to each
STRING
variable the correct localized string, by indexing
into a table of strings.
At runtime, SilkTest substitutes the appropriate localized string for each
variable. The rest of this section explains each of these steps.
Replace tags with
string variables
For example, the following portion of the window declarations for the Text
Editor application shows the declarations for the File menu and for the Find
dialog. Note that each tag has been replaced with a
STRING
variable.
window MainWin TextEditor
msw tag sMainWin
Menu File
tag sFile