You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Per Andersson <pe...@home.se> on 2003/07/27 13:23:52 UTC
[users@httpd] Have users override content negotiation in Apache2
I have enabled content negotiation in Apache 2 with MultiViews.
It works great, if a browser with preferred language=sv browses the
site, Swedish pages are displayed and if preferred language=en, English
pages are displayed.
But besides that I would like the user to be able to change site
language by clicking a link on my webpage. Is this possible? Maybe
with cookies?
I guess that one possible way to go is to link directly to the index.html.de
page (for the German link). But then I have to update all links in
index.html.de
to point to anotherpage.html.de if (and only if) anotherpage.html is
translated
to German.
This increases administration quite a bit and I seem to loose some of the
advantages with MultiViews.
/Per
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Have users override content negotiation in Apache2
Posted by André Malo <nd...@perlig.de>.
* Per Andersson wrote:
> But besides that I would like the user to be able to change site
> language by clicking a link on my webpage. Is this possible? Maybe
> with cookies?
In 2.0.47 the 'prefer-language' variable was introduced for exactly such
purpose. A short description and an example can be found at
<http://httpd.apache.org/docs-2.0/content-negotiation.html#better> (last
paragraph).
The distributed sample config also contains an example (since 2.0.47) in
conclusion with the httpd manual.
HTH, nd
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org