I thought I should briefly describe what I just added:
(1) GT._("string",...,true)
If you use a boolean value as the last parameter of a GT._() call, like
this:
GT._("this will always be translated", true)
or
GT._("this will always be translated", false)
or
GT._("this {0} will always be translated", myVariable, false)
(where myVariable is an int, String, or Object[])
then that phrase will always be translated, regardless of any other
settings.
The boolean value is discarded -- it's just there to select a different
method than
GT._("this will not always be translated")
and to be differentiated from an int, String, or Object[].
[My first mistake was to rename the method, not realizing that it MUST
be GT._("...",...) for propery gettext processing.]
(2) implementation options
OK, so now we have two kinds of GT._() calls -- ones that are always
translated and ones that are optionally translated.
What I did was to implement this always-translated version in the popup
menu section specifically. So no matter what, the pop-up menu system
should be translated.
Then I added:
GT.setDoTranslate(trueOrFalse)
and implemented it in three places:
a) at applet startup, <param name="doTranslate" value="true|false"> sets
translation "always on" or "always off" (excluding the menu, which is
always translated).
b) using the "set languageTranslation" script command, you can turn
translation on and off
c) I've put it around the applet.scriptWait() command (though not the
applet.script(). Note that you could still have translation there if you
use "set languageranslation" as part of your script.
I'm pretty sure this will take care of our translation worries, and I
think it has enough flexibility to do pretty much whatever we want. I
don't know if (c) is necessary or desired; you tell me.
Bob
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers