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
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_
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
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
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