> want to switch language during runtime with button - event Listeners :
>
> e.q. qx.locale.Manager.getInstance().setLocale("en");
>
> Button is working fine :
>>>
>       qx.locale.Manager.getInstance().addListener("changeLocale",
> function()
> {
>          alert("it works");
>       }, this);
>
> but the translation will not appear ...

Where would you expect a translation to happen? E.g. in your
"changeLocale" listener, if you are looking for a translation of "it
works", you'd need to wrap this string into a this.tr() call, like
'alert(this.tr("it works"));'. All strings that should show a translation
at runtime need this.

And you only see a change if you have added an actual translation into the
corresponding .po file (en.po in this case). And only if that translation
is different from the original key "it works" (mh, but what would that be
in English?!).

Do this:
- change the alert() call to 'alert(this.tr("it works"))'
- run generate.py translation
- load the file source/translation/en.po in an editor
- locate the string (msgid) "it works"
- and change the translation (msgstr) to e.g. "foo bar"
- run generate.py source
- open your app in the browser and hit the button
- the alert box should now say "foo bar"

T.



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to