cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kjetil Kjernsmo <Kjetil.Kjern...@computas.com>
Subject LocaleAction to preserve settings
Date Wed, 28 May 2008 12:16:12 GMT
All,

I'm struggling with LocaleAction. I've set it up, and so far, using the 
default and Accept-Languages through use-locale works well. 

Now, I'd like to provide the user with a simple way (i.e. simpler than setting 
browser settings, people don't tend to use it, unfortunately). 

The application is RESTful, so I was hoping to keep it that way and avoid 
cookies. Thus, store-in-request looked like the right thing. I was hoping 
using this was as simple as adding ?locale=no to some URIs to have it set, 
and then LocaleAction would take over and ensure it would be appended to all 
internal links or the page, but it was apparently not the intention. 

Am I overlooking something obvious here, is there a way to do this easily?

So, I tried setting   <store-in-cookie>true<store-in-cookie>, thus abandoning

the REST design goal. A session seems to be created now, I get a session 
cookie, even though I didn't really ask for that. Also, I see that even 
though I manage to get one request to see the new locale I give it, the next 
request does not retain this information. So, apparently, the session cookie 
set has no influence on the locale set by the request. 

My code correctly uses the locale, so the problem here is only that the locale 
is not retained across requests. 

How can I use Cocoon to do this?


Kind regards 

Kjetil Kjernsmo
-- 
Senior Knowledge Engineer
Direct: +47 6783 1136 | Mobile: +47 986 48 234
Email: kjetil.kjernsmo@computas.com   
Web: http://www.computas.com/

|  SHARE YOUR KNOWLEDGE  |

Computas AS  Vollsveien 9, PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | 
Fax:+47 6783 1001


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message