On Thursday, October 02, 1997 3:52 AM, Norbert Weissenberg
[SMTP:[EMAIL PROTECTED]] wrote:
> how can a VTCL generated interface best be internationalized, which
> mainly means switching between German and English texts in labels and
> buttons:
> - via a ressource file
> - via using associative arrays or functions in -label/-text-arguments
> I tried the latter, but it does not behave well under vtcl 1.10.
Well, I gather from your text that you speak english first, right? Well, so
long as it is acceptable to have to choose at program startup you could do
this:
Have a global array programTexts.
Have a proc InitializeProgramTexts which takes as an arguement either german
or english. Have it just load up an array with something like this:
set programTexts(okbutton) "Ok"
or
set programTexts(okbutton) "GermanOk"
Now later in the program, when you do your button, say:
global programTexts
button .ok -text $programTexts(okbutton)
This puts all your phrases in one fairly easily managed place, and lets you
impudently use english throughout the rest of the program.
Hope this helps.
-sam
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).