Hello Peter,
P> Thank you Alan, this does exactly what I asked for.
P> Now I'll only have to see how I get the buttons to
P> display different names for each language. I think
P> I can follow a similar pattern.
You could keep the same bar and button:
>> First item: Format Context The Bat!
>> Second item: runfile.LanguageChanger
and add something to the LanguageChanger.powerpro script:
If(win.childtextbyindex("The Bat!",3)=="Account specials")do
[your change to German command here]
cl.SetLabel("mybar1", "lang", "Englisch")
else
[your change to English command here]
cl.SetLabel("mybar1", "lang", "Deutsch")
endif
Notes:
Maybe it looks the wrong way round, but when you switch
to German, the label should be changed to "Englisch" because
that is what will happen if you click it.
Instead of "mybar1" use the name of your bar's command list.
-- either --
Where I have put "lang" you could put the item number:
cl.SetLabel("mybar1", 2, "Englisch")
Then the job is finished.
-- or --
Or keep the "lang" (in quotes) as an ID for the button.
If so, you must change the Name field of the button in your
command list to give it the ID (identity) of "lang"
Name field: Englisch<id=lang>
Command: runfile.LanguageChanger
As you can see, calling the Item "2" is easier - if you
never move the button to a different place on the bar.
For buttons which might be moved, the second method,
adding an <id=something> to the Name, is better.
Don't worry, the cl.SetLabel command will not change
the <id=lang> part of the Name field.
______________________________________________
There is a problem about how to start.
When you first launch The Bat! is it in English or German?
If it starts in German, my advice above is correct (I think)
If it starts in English, change my advice to:
Name field: Deutsch<id=lang>
Command: runfile.LanguageChanger
______________________________________________
I hope that will work for you :)
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/