Yes, I use the JSTL fmt tag.
<fmt:message key="list.title" />
I would like to set the locale based on a request parameter (comes from an hardcoded iframe url), and not from the user's browser.
I did a quick test, and put this code in my controller:
Code:
ReloadableResourceBundleMessageSource msgSrc =
new ReloadableResourceBundleMessageSource();
String s = msgSrc.getMessage("list.title", null, new Locale("en"));
logger.debug("english: " + s);
s = msgSrc.getMessage("list.title", null, new Locale("no"));
logger.debug("norwegian: " + s);
and this hardcoding approach works.
My problem is; How do I set locale on a request so the jstl fmt tag display text from the correct application.properties file.