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

           Summary: Bring the new I18NMatcher in line with LocaleAction
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The new document-oriented i18n support added by Upayavira works mostly like the 
existing i18n in 
terms of gracefull degradation (ru_EE_KOI8 -> ru_EE -> ru), but does not check for two 
cases:

locale in session
locale in cookie

The first implementation has the following search order (original text slightly 
edited):

"The site will cater for locale provided:
- as a request parameter,
- as one of the acceptable locales configured within the browser, or
- as a site default."

The LocaleAction documentation says:

"The following search criteria are used in order when ascertaining  locale  values:
    1.      Request CGI parameter locale
    2.      Session attribute locale
    3.      First matching Cookie parameter locale  within each cookie sent  with the 
current request
    4.      Locale setting of the requesting object"
and there is also a notion of a default locale if no match was found (corresponding to 
the last case in 
I18NMatcher).

***The idea is to add criteria 2. and 3. from LocaleAction to the new I18NMatcher.***

The relevant e-mail discussion is here (see esp. the 3.-4. last messages):
http://marc.theaimsgroup.com/?t=108932085200002&r=1&w=2&n=18

LocaleAction documentation is found here:
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/acting/LocaleAction.html

The two new search criteria should be combined with corresponding (configurable) 
actions of 
setting the locale in the session/a cookie, cf. the present i18n support.

With these additions, user locale overrides could be maintained throughout a session 
without further 
work by the webapp developer, and potentially longer (for the life of the cookie). 
This again will give a 
nicer user experience.

Making the two i18n parts behave similar/identical will also ease i18n of webapps.

Reply via email to