httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@collab.net>
Subject Re: Language Negotiation: "No Acceptable Variant"
Date Tue, 30 Jan 2001 04:43:32 GMT
On Mon, 29 Jan 2001, Koen Holtman wrote:
> I recall that, in any case the last time I touched it, mod_negotiation had
> a heuristic for the second case above: with Accept-language: en-gb,
> mod_negotiation will assume that `en' is also still OK, so in that case
> the user would get en. 

Yep, this is how it works (just tested).

I'm intrigued by the idea of giving someone the default, but that seems to
present a hegemony of a particular language.  Instead, the 406 response
document could probably be improved to help the end-user understand that
they do have the ability to tailor their browser to add more languages
they may understand.  E.g., right now they get:

<HTML><HEAD>
<TITLE>406 Not Acceptable</TITLE>
</HEAD><BODY>
<H1>Not Acceptable</H1>
An appropriate representation of the requested resource
/docs/mod/directive-dict.html could not be found on this server.<P>
Available variants:
<ul>
<li><a href="directive-dict.html.en">directive-dict.html.en</a> , type
text/html, language en
<li><a href="directive-dict.html.ja.jis">directive-dict.html.ja.jis</a>
,
type text/html, language ja, charset iso-2022-jp
</ul>

We could easily modify the text to make it look less like an error and
more like an informational thing, e.g. 

  We do not have the document in the languages you've indicated you
  accept, which are '$lang'.  We do have the documents available in other
  languages, though, which we provide direct links to below.  If you are
  able to read one of these other languages, we urge you to consider
  configuring your browser to indicate an acceptance of these languages.

To be really slick, we could provide the above error message in one of the
acceptable languages.

I'm worried that just assuming that a 406 means an error means "give them
an english document" is a viewpoint too English-centric.

	Brian




Mime
View raw message