[
http://www.stripesframework.org/jira/browse/STS-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frederic Daoud resolved STS-676.
--------------------------------
Resolution: Fixed
Assignee: Frederic Daoud
Fixed in the documentation.
> setLocale is needed for fmt:message
> -----------------------------------
>
> Key: STS-676
> URL: http://www.stripesframework.org/jira/browse/STS-676
> Project: Stripes
> Issue Type: Bug
> Components: Documentation
> Affects Versions: Release 1.5.1
> Reporter: Ward van Wanrooij
> Assignee: Frederic Daoud
> Priority: Minor
>
> The documentation states at
> http://www.stripesframework.org/display/stripes/Localization:
> "Secondly, you should never have a need to use the <fmt:setLocale.../> tag.
> Because of Stripes' strategy of using a filter and a request wrapper, all
> components in your application, including the JSTL tags, will always get the
> right locale when they call request.getLocale()."
> However, the <fmt:message/> does not call request.getLocale() but instead
> some other variables (more info at
> http://osdir.com/ml/java.stripes.user/2007-03/msg00086.html), unlike the
> other <fmt:*/> tags. You can reproduce this by creating a sample web
> application that contains a class extending DefaultLocalePicker to return a
> hardcoded locale (e.g. nl_NL), rename your StripesResources.properties to
> StripesResources_nl.properties and use <fmt:message/> to include a localized
> string. If you then request a page while sending no accept-language tags (for
> example using telnet), you will see that only the <fmt:message/> refers to
> ???variables???, other localized values work as expected. This issue affects
> Google as its bot does not send and language headers.
> Workaround is to include <fmt:setLocale
> value="${pageContext.request.locale}"/> in a common taglib before any
> <fmt:message/>. So, calling setLocale() is useful in these cases.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development