On 2/28/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
Hi all!
I noticed that we still have no strategy to get the current locale,
except of the locale that the request has.
I think we have two choices:
1) Modifying the TilesRequestContext.getRequestLocale implementations,
so that it tries to take the current locale from the session (the
ComponentConstants.LOCALE_KEY is there but it is never used);
2) Introduce a "LocaleResolver" interface, that has a method that
takes a TilesRequestContext and returns the current Locale. This
resolver will be used (I suppose) only in UrlDefinitionsFactory and
can be configurable.
I prefer the latter option, but I am open to comments and suggestions.
Paul Benedict in the Struts-dev mailing list started a thread about a
similar issue:
http://www.nabble.com/Struts-1.4---2.1-sharing-localization-code-tf3270764.html
He also created a patch with some code (based on some Spring stuff)
attached to the following Jira ticket:
https://issues.apache.org/struts/browse/STR-2897
Niall
Thoughts?
Antonio