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_fr.js



So you could refactor your js file into two.. one for locale specific variables and messages, and another just for code.. Then tapestry will choose the correct messages js file using the user's locale...

include( mymessages.js, mycode.js )

mymessages_en.js
mymessages_fr.js
mycode.js



This won't help if you just wanted to leverage the Message bundles that the app is already using.. To do that, we would have to cook up some code and stuff to transform the js files as they are served up (no support for that at the moment ).




Thiago H. de Paula Figueiredo wrote:
On Wed, Feb 11, 2009 at 7:08 AM, Jonathan O'Connor <ninki...@eircom.net> 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. ;)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to