You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kjetil Kjernsmo <Kj...@computas.com> on 2008/05/28 14:16:12 UTC

LocaleAction to preserve settings

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