Amit Rana wrote:
> hi,
>
> yes .. I got that. Thanks for the help.
> But, I am not able to translate the content present in a variable.
>
> For example,
> var str = "Hello World";
> var myLabel = new qx.ui.basic.Label();
> myLabel.set({content: this.tr(str)}); //line 54
>
> gives me error as:
> !!! Could not extract translation from myFileName!
> !!! Unsupported param of type variable at line 54
>
> I tried including the mixin as include : [qx.locale.MTranslation], but
> still the same error.
>
> I even tried myLabel.set({content: qx.locale.Manager.tr(str)}); but same
> error.
>
Amit,
you're funny. You *cannot* pass a variable into 'tr', that would defeat
its whole purpose. That's what the error message is trying to convey.
You need to pass in a literal string. See the docs
(http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget -> Methods
-> tr()). - What would you say why it has to be a literal string?
T.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel