aboutsummaryrefslogtreecommitdiffstats
path: root/greek/devel/website/content_negotiation.wml
blob: 0ff8203631f08b0d826906cb6a24c5cb518bc3d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#use wml::debian::template title="Content Negotiation"
#use wml::debian::translation-check translation="c646e774c01abc2ee3d32c65d6920ea4f03159dc" maintainer="galaxico"

<H3>How Does the Server Know Which File to Serve</H3>
<P>You will notice that internal links don't end in .html. This
is because the server is using content negotiation to decide
which version of the document to deliver. When there is more
than one choice, the server will make a list of all possible
files to serve, e.g. if the request is for 'about', then the list
of completions might be about.en.html and about.de.html.
The default for Debian servers will be to serve the English
document, but it is configurable.

<P>If a client has the proper variable set, for example to serve German,
then in the example above about.de.html would be served. The
nice thing about this setup is that if the desired language is
not available, a different language will be delivered instead
(which hopefully is better than nothing). The decision on which
document is served is a bit confusing so instead of describing
it here, you should get the definitive answer from
<a href="https://httpd.apache.org/docs/current/content-negotiation.html">https://httpd.apache.org/docs/current/content-negotiation.html</a>
if you are interested.

<P>Because many users will not even know of the existence of content-negotiation,
there are links at the bottom of every page pointing directly
to the version of that page in every other language available.
This is computed using a perl script called by wml when the
page is generated.

<P>There is also an option to override the browser language preferences
using a cookie that prioritises a single language over the browser preferences.

© 2014-2024 Faster IT GmbH | imprint | privacy policy