[EMAIL PROTECTED] wrote:

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 [EMAIL PROTECTED]  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.


(on train - can't reply through Bugzilla)

I don't quite understand how your two stage procedure would work. As the selection of the locale is fundamentally connected with the available resources. As you work through each method for selecting a locale, you look for a resource using that method, if found, you exit. Otherwise, you try the next method, and if necessary, you degrade from variant/country/language, etc. How could this be done as separate select locale/select resource stages?

Regards, Upayavira


WDYT?

Vadim








Reply via email to