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

Re: What about a sticky language browsing?

Le 07/04/2012 19:57, David Prévot a écrit :
> Le 09/01/2007 16:42, Philip Hands a écrit :
>> I was _not_ trying to re-raise the old idea whereby following a single
>> language specific link results in your experience of the whole Debian site
>> flipping languages. (I'm aware that is too painful to contemplate)
> […] I wonder if that would be possible now that
> all our mirrors are handled by DSA (so we can tweak the Apache
> configuration a bit more easily than we used to).

> […] something like:
> 	[new] http://www.d.o/${ll}/${path}
> with ${ll} being the language code could provide the content of:
> 	[old] http://www.d.o/${path}.${ll}(.html)
> One issue I can think of is that we would duplicate the number of
> similar content available in various URL, and that will be a problem for
> search engine, in term of ranking…

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


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).



Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: