Re: [T5] Internationalizing included js

2009-02-11 Thread Alex Kotchnev
Thiago / Jonathan / Fernando, thanks for everyone's input ! Indeed, the asset localization of js does work out OK. Refactoring the code would certainly get the job done. I've also used the ${message:foo} expansions in js that's included in a page, that works OK too. I guess the issue is that

Re: [T5] Internationalizing included js

2009-02-11 Thread Fernando Padilla
Not the best option but: Don't forget that included js files are determined using Tapestry's Internationalication/Localization code.. http://tapestry.apache.org/tapestry5/guide/localization.html so: include( my.js ) would look up the right js file using the locale of the user: my_en.js my_

Re: [T5] Internationalizing included js

2009-02-11 Thread Thiago H. de Paula Figueiredo
On Wed, Feb 11, 2009 at 7:08 AM, Jonathan O'Connor wrote: > Alex, according to Thiago, you can have string substitution in the javascript: Yes, if the Javascript is generated inside the page, not in an external file. ;) -- Thiago

Re: [T5] Internationalizing included js

2009-02-11 Thread Jonathan O'Connor
Alex, according to Thiago, you can have string substitution in the javascript: >>>THIAGO Another solution is to put a Tapestry expression expansion inside the Javascript code: Page class: public Link getEventLink() { return componentResources.createXXXLink(parameters); } Template: window

[T5] Internationalizing included js

2009-02-10 Thread Alex Kotchnev
What is the best method for internationalizing strings inside of .js files included using the @IncludeJavaScript annotation ? I've looked around and I see that I can use the regular message catalog and string substitution (e.g. addScript(String format, Object... arguments);) if the script is attach