cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30046] - Bring the new I18NMatcher in line with LocaleAction
Date Mon, 09 Aug 2004 14:34:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30046>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30046

Bring the new I18NMatcher in line with LocaleAction





------- Additional Comments From vgritsenko@apache.org  2004-08-09 14:34 -------
Added code for checking locale stored in session and in cookie. Full locale
checking order now is:
 * request parameter
 * session attribute
 * cookie
 * sitemap parameter
 * request locale(s) - optional, depends on use-locale(s) config parameters.
 * default
 * blank

LocaleAction supports same order but has no sitemap parameter, and has no
default locale, and blank locale (because request locale checking is not
optional - and will always return some non null locale).

Now, about setting locale into the request/session/cookie: this is not as simple
as it looks. Problem is that LocaleAction selects first available locale, but
I18nMatcher goes through *all* available locales till it finds matching
resource. Thus, for one resource it can result in one locale, and for other
resource - in other locale, so locale returned by I18nMatcher can not be used
for setting into session/cookie.

I18nMatcher can be changed to be two-step procedure, (1) select locale, (2)
using selected locale search for resource in this locale (with variant ->
country -> language -> blank degradation). This modified I18nMatcher will be
more compatible with LocaleAction, and then it can be modified to set chosen
locale into session/cookie.

WDYT?

Vadim

Mime
View raw message