[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What about a sticky language browsing?



-=| David Prévot, 08.04.2012 23:26:25 -0400 |=-
> Raphael Geissert also proposed on IRC to use cookies, e.g.:
> 
> RewriteRule \.(\w{2}(?:-\w{2})?)\.html$ - [CO=lang:$1:www.debian.org]
> SetEnvIf Cookie "lang=(.+)" prefer-language=$1 Header append Vary cookie
> 
> That would define a cookie once the user hits an
> 
> 	http://www.d.o/${path}.${ll}.html
> 
> URL, keeping the ${ll} data that will be used on top of the current
> browser setup.
> 
> So once someone manage to hit a page in the preferred language, it will
> be sticky as planned. An inconvenient being that if one follows a link
> in a specific language (e.g. a link to the original page on top of an
> outdated translation), the default language already setup in the browser
> will be overwritten for the session (until it's overwritten by another
> language if the user follows a link to a translated page on the footer
> for example).

This seems acceptable to me. You follow a link to the German 
translation of the web site and the site keeps that preference unless 
you tell it otherwise (or ignore cookies).

Attachment: signature.asc
Description: Digital signature


Reply to: