cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens" <>
Subject LocaleAction and cookies
Date Thu, 21 Jul 2005 14:36:00 GMT

I'm using Cocoon 2.1.7 to generate a bilingual site (i.e. every page may be 
displayed in either English or Chinese, according to the users' preference). 
  I want the chosen language to be remembered between page requests, but 
there may not a session available (we had problems on a previous site when 
we hit the configured max sessions limit on the server, so we don't want the 
"brochureware" parts of the site to always create a session since they don't 
really need one).  Therefore, I've got the LocaleAction configured to 
store-in-cookie as well as store-in-session.

However, I've discovered that as I browse around the site's hierarchy it's 
creating multiple locale cookies, under every path I visit.  This means that 
if I go to /site/a, then /site/area/b, switch locales 
(/site/area/b?locale=zh_HK), then request /site/a again, it still displays 
in English rather than the Chinese I was expecting (as the en_GB cookie with 
the higher level path still exists).  By the time I've browsed all over the 
site, switching back and forth between the languages, it's anyone's guess 
which language any particular page will display :-(

Is there any way to specify a particular path for the locale cookie to use, 
so that I can set it to "/" and have it affect the whole site?  For that 
matter, I may want to change the domain it uses, or set an expiry time so 
that it's persistent between browser sessions.  Is there any way to do this?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message