Re: Struts 2 Internationalization Tiles 2

2012-01-13 Thread Hernán
Thank you very much, It's very interesting, though I needed something like this to get the current language anyway: jQuery: $.getJSON("/i18nUtil/GetLanguageJSONAction", function(language) { locale = language; } ); Java c

Re: Struts 2 Internationalization Tiles 2

2012-01-13 Thread Jeffrey Black
Have you given this plugin a whirl? http://code.google.com/p/jquery-i18n-properties/ On Fri, Jan 13, 2012 at 1:28 PM, Hernán wrote: > Thank you it worked! > >public String execute() { >String requestLocale = getRequestLocale(); >Map session = getSession(); >session.

Re: Struts 2 Internationalization Tiles 2

2012-01-13 Thread Hernán
Thank you it worked! public String execute() { String requestLocale = getRequestLocale(); Map session = getSession(); session.put("request_locale", requestLocale); //I added the following line of code to ChangeLocaleAction: session.put(DefaultLocaleResol

Re: Struts 2 Internationalization Tiles 2

2012-01-13 Thread Jeffrey Black
Just for kicks try setting the following in your Session map: *public static final String LOCALE_KEY = "org.apache.tiles.LOCALE";* [1] http://tiles.apache.org/framework/tiles-core/xref/org/apache/tiles/locale/impl/DefaultLocaleResolver.html On Fri, Jan 13, 2012 at 11:01 AM, Hernán wrote: > > Ye

Re: Struts 2 Internationalization Tiles 2

2012-01-13 Thread Hernán
Yes I've done that, I have tiles.xml for english, tiles_es.xml for spanish and tiles_pt-xml for portuguese... The thing is that it works with the browser settings, when somebody changes the locale by a link of the web app, it works for struts2 but not tiles2 definition titles, I'm about to try with

Re: Struts 2 Internationalization Tiles 2

2012-01-13 Thread Jeffrey Black
I seem to recall needing a different tiles definition for each locale you wish to support? Does that ring a bell to anyone? I will double-check some documentation when I get a chance. jb On Fri, Jan 13, 2012 at 9:06 AM, Hernán wrote: > Hi there, I'm applying internationalization to a WebApp,

Struts 2 Internationalization Tiles 2

2012-01-13 Thread Hernán
Hi there, I'm applying internationalization to a WebApp, and so far so good, almost everything is working as expected. When the user accesses the site, depending on its browser configuration he sees the web site in his or her preferred language, if he or she decides to change the language, I change