Hi list,
I'm using struts 2.1.8 with JDK6
I've Message.properties | Message_de_DE.properties
and Message_en_US.properties.
When switching the local via a browser plugin everything
works fine and I can see that Session.WW_TRANS_I18N_LOCALE
contains the expected locale (de_DE or en_US).
Now I've added a languages.jsp that contains 2 links
Constructed like this:
<s:url id="url" action="./languages">
<s:param name="request_locale">en_US</s:param>
</s:url>
<s:a href="%{url}">English</s:a>
</li>
<li>
<s:url id="url" action="./languages">
<s:param name="request_locale">de_DE</s:param>
</s:url>
<s:a href="%{url}">Deutsch</s:a>
When using one of these links I can see that
Session.WW_TRANS_I18N_LOCALE changes it's value
accordingly but the displayed language stays the same and
doesn't change.
languages.jsp uses an action like the following:
--snip-
public class LanguagesShowAction extends ActionSupport implements
ServletRequestAware {
HttpServletRequest request;
private Map<String, Object> application;
private Map<String, Object> session;
public String execute() {
application = ActionContext.getContext().getApplication();
session = ActionContext.getContext().getSession();
session.put("referer", "languages");
String localeParam = request.getParameter("request_locale");
System.out.println("localeParam = " + localeParam);
if (localeParam != null && !localeParam.isEmpty()) {
return "localeChngd"; //used to redirect to another jsp
}
System.out.println("loading languages page");
return SUCCESS;
---snap---
Any ideas on what I may have done wrong?
Additional info needed?
Regards,
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]