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 attached to
a particular element or something similar. However, if I am including the js
using the @IncludeJavaScript annotation, what is the best approach ? I've
tried (and it works great) to add localized js assets (e.g. foo.js,
foo_bg.js, etc) and the localization works nicely. However, my little hangup
with that is the actual code inside of the js is the same, just the messages
are different. Can I somehow configure T5 to process the js (just like a tml
file) and do message substitution inside (e.g. so that I can use expansions
like ${message:foo-message} inside the js file).

I guess I can also include the js inline in the .tml and the message catalog
substitution would work.

Cheers,

Alex K

Reply via email to