You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by infiniter <in...@gmail.com> on 2012/02/17 02:32:15 UTC

Re: how to do i18n of javascript file with Wicket?

I have the exact same issue.. What did you decide for your problem?
I'm trying to decide now what the best approach is. Two of my options were
exactly the ones you describe to improve your design, but the one that I
currently have is a template, which looks like this:

var someData= {
   'msg'='${message:hello}';
   'a'='${message:min}';
   'b'='${message:max}';
}

The nasty part is that for each JS template you have to create your
variables model, which is just a hashmap. I have a simple function that
looks like:

addMessageToVariablesMap(variablesMap, "min");

I don't like having to provide a variables model to get the messages, but
instead I'd like to make the message-resolving part automatic just like
wicket:message in the markup files. I still haven't done that. 

Ideas are welcome.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-do-i18n-of-javascript-file-with-Wicket-tp1867123p4396038.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org