You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Joshua Slive <sl...@finance.commerce.ubc.ca> on 2001/01/29 05:40:54 UTC

Language Negotiation: "No Acceptable Variant"

A quick look at the error logs on apache.org shows almost 500 "No
Acceptable Variant" errors so far today.  Many of these errors are caused
by people with misconfigured browsers trying to deal with our new
language-negotiated manual.  (I am defining "misconfigured" as not
including "en" for english in their browser language preferences, although
that is an admittedly english-centric view of things.)

We discussed this once before, and concluded that there was nothing we
could do about.  However, I now believe that this is not true.  If there
is a file with with no language attribute associated with it, then Apache
will serve that file in preference to the "No Acceptable Variant" error.
So, for example, if we include a page called "index.html.html", then since
this page has no language, it will be served as a "default" page.

So, I see three options:

1. Leave things as they are and hope that people with misconfigured
browsers fix them.

2. Put a page in index.html.html describing how to configure content
negotiation (as in http://www.debian.org/intro/cn)

3. Just symlink (can that be done in cvs?) index.html.html to
index.html.en to make english the default page.  This could be done for
every page where we add a translation.

I am leaning towards 3, but would like input on how this could be done in
cvs.

In the future, as we get more translations, we should also do something
more akin to the Debian model where each page lists all the translations
available and a link to a "language help page".

Opinions?

Joshua.


Re: Language Negotiation: "No Acceptable Variant"

Posted by David Reid <dr...@jetnet.co.uk>.
BTW, can't help but think that recent posts in this discussion were more
appropriate on new-httpd...

david

> >
> > There seem to be some on new-httpd?  Maybe try asking there.
>
> Lars Eilebrecht <la...@apache.org> for sure.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
David Reid wrote:
> 
> There seem to be some on new-httpd?  Maybe try asking there.

Lars Eilebrecht <la...@apache.org> for sure.
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

Re: Language Negotiation: "No Acceptable Variant"

Posted by David Reid <dr...@jetnet.co.uk>.
There seem to be some on new-httpd?  Maybe try asking there.

david
----- Original Message -----
From: "Joshua Slive" <sl...@finance.commerce.ubc.ca>
To: <ap...@apache.org>
Sent: Monday, January 29, 2001 4:53 PM
Subject: Re: Language Negotiation: "No Acceptable Variant"


> On Mon, 29 Jan 2001, Chris Pepper wrote:
> > A DefaultLanguage directive (defaulting to en), specifying
> > the preferred language(s) for browsers that don't specify their own
> > preference, seems like the right way to do it.
>
> Thanks for the feedback Chris and James.  I don't disagree with the
> conclusion.  I should point out, to avoid confusion, that Apache does
> have a DefaultLanguage directive, but it DOES NOT do what we want.  It
> just specifies the language associated with all non-specified files.  What
> we want is a directive that will indicate what file to send when no
> acceptable variants are found.
>
> I get the feeling, however, that we are all talking about something that
> we really don't know much about.  I wish we had some real language
> negotation experts here.
>
> Joshua.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
> For additional commands, e-mail: apache-docs-help@apache.org
>
>


Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Thu, 8 Feb 2001, Koen Holtman wrote:

> 
> 
> On Thu, 8 Feb 2001, Joshua Slive wrote:
> 
> [....]
> > So that is two suggestions:
> > 
> > 1. Find a way to provide ErrorDocument with enough information so that
> > webmasters can customize the "No Acceptable Variants" message.  This could
> > also be useful for mod_speling.
> > 
> > 2. Add a "FallBackLanguage" directive to use when negotiation fails.
> > 
> > These directives could be combined such that ordinary content gets the "No
> > Acceptable Variants" ErrorDocument when negotiation fails, but the
> > ErrorDocument itself is subject to the FallBackLanguage directive in case
> > it can't find a good language.
> > 
> > And possibly:
> > 
> > 3. Change the default text of the "No Acceptable Variants" page to be
> > a little more friendly, at least in English.
> > 
> > Unfortunately, I don't know this code nearly well enough to even start
> > implementing this stuff.
> 
> If I recall correctly, the message under 3. above is hard-coded in
> mod_negotiation, and it will be fairly trivial to hard-code some
> additional english text in it.
> 
> I think that 2. Add a "FallBackLanguage" directive is a good enough idea
> that, if there is some wider consensus here that this directive would be a
> good thing to have, I am volunteering to code up a patch for it (I think
> this would take me a day of work).
> 
> I know too little about Apache internals to guess how much work 1. would
> be...

I once did something vaguely similar to mod_speling using an ErrorDocument
CGI, so I don't think it would be too hard. Option 2 was my idea
originally, though, so I think I still prefer that :-)


James.


Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Thu, 8 Feb 2001, Koen Holtman wrote:

> 
> 
> On Thu, 8 Feb 2001, Joshua Slive wrote:
> 
> [....]
> > So that is two suggestions:
> > 
> > 1. Find a way to provide ErrorDocument with enough information so that
> > webmasters can customize the "No Acceptable Variants" message.  This could
> > also be useful for mod_speling.
> > 
> > 2. Add a "FallBackLanguage" directive to use when negotiation fails.
> > 
> > These directives could be combined such that ordinary content gets the "No
> > Acceptable Variants" ErrorDocument when negotiation fails, but the
> > ErrorDocument itself is subject to the FallBackLanguage directive in case
> > it can't find a good language.
> > 
> > And possibly:
> > 
> > 3. Change the default text of the "No Acceptable Variants" page to be
> > a little more friendly, at least in English.
> > 
> > Unfortunately, I don't know this code nearly well enough to even start
> > implementing this stuff.
> 
> If I recall correctly, the message under 3. above is hard-coded in
> mod_negotiation, and it will be fairly trivial to hard-code some
> additional english text in it.
> 
> I think that 2. Add a "FallBackLanguage" directive is a good enough idea
> that, if there is some wider consensus here that this directive would be a
> good thing to have, I am volunteering to code up a patch for it (I think
> this would take me a day of work).
> 
> I know too little about Apache internals to guess how much work 1. would
> be...

I once did something vaguely similar to mod_speling using an ErrorDocument
CGI, so I don't think it would be too hard. Option 2 was my idea
originally, though, so I think I still prefer that :-)


James.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.

On Thu, 8 Feb 2001, Joshua Slive wrote:

[....]
> So that is two suggestions:
> 
> 1. Find a way to provide ErrorDocument with enough information so that
> webmasters can customize the "No Acceptable Variants" message.  This could
> also be useful for mod_speling.
> 
> 2. Add a "FallBackLanguage" directive to use when negotiation fails.
> 
> These directives could be combined such that ordinary content gets the "No
> Acceptable Variants" ErrorDocument when negotiation fails, but the
> ErrorDocument itself is subject to the FallBackLanguage directive in case
> it can't find a good language.
> 
> And possibly:
> 
> 3. Change the default text of the "No Acceptable Variants" page to be
> a little more friendly, at least in English.
> 
> Unfortunately, I don't know this code nearly well enough to even start
> implementing this stuff.

If I recall correctly, the message under 3. above is hard-coded in
mod_negotiation, and it will be fairly trivial to hard-code some
additional english text in it.

I think that 2. Add a "FallBackLanguage" directive is a good enough idea
that, if there is some wider consensus here that this directive would be a
good thing to have, I am volunteering to code up a patch for it (I think
this would take me a day of work).

I know too little about Apache internals to guess how much work 1. would
be...

Koen.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.

On Thu, 8 Feb 2001, Joshua Slive wrote:

[....]
> So that is two suggestions:
> 
> 1. Find a way to provide ErrorDocument with enough information so that
> webmasters can customize the "No Acceptable Variants" message.  This could
> also be useful for mod_speling.
> 
> 2. Add a "FallBackLanguage" directive to use when negotiation fails.
> 
> These directives could be combined such that ordinary content gets the "No
> Acceptable Variants" ErrorDocument when negotiation fails, but the
> ErrorDocument itself is subject to the FallBackLanguage directive in case
> it can't find a good language.
> 
> And possibly:
> 
> 3. Change the default text of the "No Acceptable Variants" page to be
> a little more friendly, at least in English.
> 
> Unfortunately, I don't know this code nearly well enough to even start
> implementing this stuff.

If I recall correctly, the message under 3. above is hard-coded in
mod_negotiation, and it will be fairly trivial to hard-code some
additional english text in it.

I think that 2. Add a "FallBackLanguage" directive is a good enough idea
that, if there is some wider consensus here that this directive would be a
good thing to have, I am volunteering to code up a patch for it (I think
this would take me a day of work).

I know too little about Apache internals to guess how much work 1. would
be...

Koen.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Brian Behlendorf wrote:
> 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.
>

I want to restart this thread, because it never came to a conclusion.

Brian's idea is fine, but pretty much impossible to implement, in my
opinion (at least as far as providing the error message in multiple
languages).  On the other hand, it would be great if enough information
could be provided in the environment such that a custom ErrorDocument
could be used to list all the available variants.

Then here's where the fun part comes: what if you don't have an
ErrorDocument in any of the "acceptable" languages?  In general, the
webmaster is the one best able to know what language should be served in
that case.  For example, in httpd.apache.org, that would clearly be
english, while in www.apache.jp, it would clearly be japanese.

Currently, in order to implement such a "fall-back" page with MultiViews,
it is necessary to have a page with an extension that is not mapped to any
particular language.  (eg. index.html.html in the case of the Apache 1.3
docs.)  It has been suggested (and I think it is a good idea), that there
should be some sort of FallBackLanguage directive that could tell Apache
to use a specific language-page when the accept negotiation would otherwise
fail.

So that is two suggestions:

1. Find a way to provide ErrorDocument with enough information so that
webmasters can customize the "No Acceptable Variants" message.  This could
also be useful for mod_speling.

2. Add a "FallBackLanguage" directive to use when negotiation fails.

These directives could be combined such that ordinary content gets the "No
Acceptable Variants" ErrorDocument when negotiation fails, but the
ErrorDocument itself is subject to the FallBackLanguage directive in case
it can't find a good language.

And possibly:

3. Change the default text of the "No Acceptable Variants" page to be
a little more friendly, at least in English.

Unfortunately, I don't know this code nearly well enough to even start
implementing this stuff.

To improve the present state of the Apache docs (and help out the millions
of people with "misconfigured" browsers) I suggest immediately including
an index.html.html page in the docs which has either:

1. <!--#include virtual="index.html.en" -->
or
2. A helpful error message explaining how to configure browsers
accept-language setting.

Sorry for the excessively long message, but I would like to come to some
sort of conclusion.

Joshua


Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Brian Behlendorf wrote:
> 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.
>

I want to restart this thread, because it never came to a conclusion.

Brian's idea is fine, but pretty much impossible to implement, in my
opinion (at least as far as providing the error message in multiple
languages).  On the other hand, it would be great if enough information
could be provided in the environment such that a custom ErrorDocument
could be used to list all the available variants.

Then here's where the fun part comes: what if you don't have an
ErrorDocument in any of the "acceptable" languages?  In general, the
webmaster is the one best able to know what language should be served in
that case.  For example, in httpd.apache.org, that would clearly be
english, while in www.apache.jp, it would clearly be japanese.

Currently, in order to implement such a "fall-back" page with MultiViews,
it is necessary to have a page with an extension that is not mapped to any
particular language.  (eg. index.html.html in the case of the Apache 1.3
docs.)  It has been suggested (and I think it is a good idea), that there
should be some sort of FallBackLanguage directive that could tell Apache
to use a specific language-page when the accept negotiation would otherwise
fail.

So that is two suggestions:

1. Find a way to provide ErrorDocument with enough information so that
webmasters can customize the "No Acceptable Variants" message.  This could
also be useful for mod_speling.

2. Add a "FallBackLanguage" directive to use when negotiation fails.

These directives could be combined such that ordinary content gets the "No
Acceptable Variants" ErrorDocument when negotiation fails, but the
ErrorDocument itself is subject to the FallBackLanguage directive in case
it can't find a good language.

And possibly:

3. Change the default text of the "No Acceptable Variants" page to be
a little more friendly, at least in English.

Unfortunately, I don't know this code nearly well enough to even start
implementing this stuff.

To improve the present state of the Apache docs (and help out the millions
of people with "misconfigured" browsers) I suggest immediately including
an index.html.html page in the docs which has either:

1. <!--#include virtual="index.html.en" -->
or
2. A helpful error message explaining how to configure browsers
accept-language setting.

Sorry for the excessively long message, but I would like to come to some
sort of conclusion.

Joshua


Re: Language Negotiation: "No Acceptable Variant"

Posted by Brian Behlendorf <br...@collab.net>.
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




Re: Language Negotiation: "No Acceptable Variant"

Posted by Brian Behlendorf <br...@collab.net>.
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




Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.

On Tue, 30 Jan 2001, James Sutherland wrote:

> On Mon, 29 Jan 2001, Joshua Slive wrote:
> 
> > On Mon, 29 Jan 2001, Koen Holtman wrote:
> > > Wait a minute: is the problem that these many people send, say
> > >
> > >  Accept-language: fr
> > >
> > > when they in fact speak en+fr and prefer en, or is the problem that their
> > > browsers do not send any accept-language at all?
> > >
> > 
> > The problem is people who send
> >   Accept-language: de
> >        or
> >   Accept-language: en-gb
> > when their "true" preferences are "de,en" or "en-gb,en".  Since the server
> > has no "de" or "en-gb" variant, they get the "No Acceptable Variant" page.

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. This heuristic is there to cope with the known bad
configuration system UI design of Netscape, which makes it natural to
configure `en-gb' when what you really want to say at the http level is
`en-gb,en;q=0.9'.

For the first case, yes I think the user will get a "No Acceptable
Variant" error in the current implementation.

Koen.



Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.

On Tue, 30 Jan 2001, James Sutherland wrote:

> On Mon, 29 Jan 2001, Joshua Slive wrote:
> 
> > On Mon, 29 Jan 2001, Koen Holtman wrote:
> > > Wait a minute: is the problem that these many people send, say
> > >
> > >  Accept-language: fr
> > >
> > > when they in fact speak en+fr and prefer en, or is the problem that their
> > > browsers do not send any accept-language at all?
> > >
> > 
> > The problem is people who send
> >   Accept-language: de
> >        or
> >   Accept-language: en-gb
> > when their "true" preferences are "de,en" or "en-gb,en".  Since the server
> > has no "de" or "en-gb" variant, they get the "No Acceptable Variant" page.

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. This heuristic is there to cope with the known bad
configuration system UI design of Netscape, which makes it natural to
configure `en-gb' when what you really want to say at the http level is
`en-gb,en;q=0.9'.

For the first case, yes I think the user will get a "No Acceptable
Variant" error in the current implementation.

Koen.



Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Mon, 29 Jan 2001, Joshua Slive wrote:

> On Mon, 29 Jan 2001, Koen Holtman wrote:
> > Wait a minute: is the problem that these many people send, say
> >
> >  Accept-language: fr
> >
> > when they in fact speak en+fr and prefer en, or is the problem that their
> > browsers do not send any accept-language at all?
> >
> 
> The problem is people who send
>   Accept-language: de
>        or
>   Accept-language: en-gb
> when their "true" preferences are "de,en" or "en-gb,en".  Since the server
> has no "de" or "en-gb" variant, they get the "No Acceptable Variant" page.
> 
> People sending no accept-language at all isn't a problem becuase, I
> believe, the LanguagePriority directive will then do the necessary magic
> and send the english page.  The problem is people who lie about their
> language preferences becuase they don't understand how to configure their
> browsers.
> 
> I was willing to just ignore such people and hope they fix their
> configuration, but the problem seems to be more widespread than I
> expected.

Unless I've missed something (quite possible, this late at night!), the
solution seems to be adding a directive to specify a "language of last
resort", which will always be tried before sending the NAV error?

As pointed out earlier, this could be easily tailored by mirrors -
e.g. apache.jp could mirror the whole of apache.org's content verbatim,
but have a different setting for this variable - quite a good
approximation to what people would expect, unless they specify preferences
we can satisfy.

Alternative approach: create a CGI as the ErrorDocument for this error,
which will display a delayed redirect to the appropriate language, along
with a message explaining what's going on to the user??


James.


Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Mon, 29 Jan 2001, Joshua Slive wrote:

> On Mon, 29 Jan 2001, Koen Holtman wrote:
> > Wait a minute: is the problem that these many people send, say
> >
> >  Accept-language: fr
> >
> > when they in fact speak en+fr and prefer en, or is the problem that their
> > browsers do not send any accept-language at all?
> >
> 
> The problem is people who send
>   Accept-language: de
>        or
>   Accept-language: en-gb
> when their "true" preferences are "de,en" or "en-gb,en".  Since the server
> has no "de" or "en-gb" variant, they get the "No Acceptable Variant" page.
> 
> People sending no accept-language at all isn't a problem becuase, I
> believe, the LanguagePriority directive will then do the necessary magic
> and send the english page.  The problem is people who lie about their
> language preferences becuase they don't understand how to configure their
> browsers.
> 
> I was willing to just ignore such people and hope they fix their
> configuration, but the problem seems to be more widespread than I
> expected.

Unless I've missed something (quite possible, this late at night!), the
solution seems to be adding a directive to specify a "language of last
resort", which will always be tried before sending the NAV error?

As pointed out earlier, this could be easily tailored by mirrors -
e.g. apache.jp could mirror the whole of apache.org's content verbatim,
but have a different setting for this variable - quite a good
approximation to what people would expect, unless they specify preferences
we can satisfy.

Alternative approach: create a CGI as the ErrorDocument for this error,
which will display a delayed redirect to the appropriate language, along
with a message explaining what's going on to the user??


James.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Nick Kew <ni...@webthing.com>.
On Mon, 29 Jan 2001, Joshua Slive wrote:

> On Mon, 29 Jan 2001, Koen Holtman wrote:
> > Wait a minute: is the problem that these many people send, say
> >
> >  Accept-language: fr
> >
> > when they in fact speak en+fr and prefer en, or is the problem that their
> > browsers do not send any accept-language at all?
> >
> 
> The problem is people who send
>   Accept-language: de
>        or
>   Accept-language: en-gb

ISPs will supply browsers configured to the language they expect their
users to speak.  So naturally languages like de and fr are widespread.
I guess the same argument goes for en-gb, though surely that at least
should be read as implying a lower preference generic-en?  Brits *can*
read merkin, even those of us who prefer english.

-- 
Nick Kew


Re: Language Negotiation: "No Acceptable Variant"

Posted by Nick Kew <ni...@webthing.com>.
On Mon, 29 Jan 2001, Joshua Slive wrote:

> On Mon, 29 Jan 2001, Koen Holtman wrote:
> > Wait a minute: is the problem that these many people send, say
> >
> >  Accept-language: fr
> >
> > when they in fact speak en+fr and prefer en, or is the problem that their
> > browsers do not send any accept-language at all?
> >
> 
> The problem is people who send
>   Accept-language: de
>        or
>   Accept-language: en-gb

ISPs will supply browsers configured to the language they expect their
users to speak.  So naturally languages like de and fr are widespread.
I guess the same argument goes for en-gb, though surely that at least
should be read as implying a lower preference generic-en?  Brits *can*
read merkin, even those of us who prefer english.

-- 
Nick Kew


Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Koen Holtman wrote:
> Wait a minute: is the problem that these many people send, say
>
>  Accept-language: fr
>
> when they in fact speak en+fr and prefer en, or is the problem that their
> browsers do not send any accept-language at all?
>

The problem is people who send
  Accept-language: de
       or
  Accept-language: en-gb
when their "true" preferences are "de,en" or "en-gb,en".  Since the server
has no "de" or "en-gb" variant, they get the "No Acceptable Variant" page.

People sending no accept-language at all isn't a problem becuase, I
believe, the LanguagePriority directive will then do the necessary magic
and send the english page.  The problem is people who lie about their
language preferences becuase they don't understand how to configure their
browsers.

I was willing to just ignore such people and hope they fix their
configuration, but the problem seems to be more widespread than I
expected.

Joshua.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Koen Holtman wrote:
> Wait a minute: is the problem that these many people send, say
>
>  Accept-language: fr
>
> when they in fact speak en+fr and prefer en, or is the problem that their
> browsers do not send any accept-language at all?
>

The problem is people who send
  Accept-language: de
       or
  Accept-language: en-gb
when their "true" preferences are "de,en" or "en-gb,en".  Since the server
has no "de" or "en-gb" variant, they get the "No Acceptable Variant" page.

People sending no accept-language at all isn't a problem becuase, I
believe, the LanguagePriority directive will then do the necessary magic
and send the english page.  The problem is people who lie about their
language preferences becuase they don't understand how to configure their
browsers.

I was willing to just ignore such people and hope they fix their
configuration, but the problem seems to be more widespread than I
expected.

Joshua.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.

On Mon, 29 Jan 2001, Joshua Slive wrote:

> For the benefit of new-httpd folks dropped in on this discussion,
> the problem is that many people have incorrectly configured browsers which
> do not list "en" in their accept-languages, even when they do in fact read
> pages in english.  This is causing hundreds of "no acceptable variant"
> errors per day on the "multi-views" negotiated
> pages under httpd.apache.org/docs/.

Wait a minute: is the problem that these many people send, say

 Accept-language: fr

when they in fact speak en+fr and prefer en, or is the problem that their
browsers do not send any accept-language at all?

Koen.



Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.

On Mon, 29 Jan 2001, Joshua Slive wrote:

> For the benefit of new-httpd folks dropped in on this discussion,
> the problem is that many people have incorrectly configured browsers which
> do not list "en" in their accept-languages, even when they do in fact read
> pages in english.  This is causing hundreds of "no acceptable variant"
> errors per day on the "multi-views" negotiated
> pages under httpd.apache.org/docs/.

Wait a minute: is the problem that these many people send, say

 Accept-language: fr

when they in fact speak en+fr and prefer en, or is the problem that their
browsers do not send any accept-language at all?

Koen.



Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Koen Holtman wrote:
>
> - Have you looked into the LanguagePriority directive?

I'm pretty sure that LanguagePriority does not solve our problem.

>
> If LanguagePriority does not work for you, alternative tricks that might
> work are:
>
>  - do not mark the documents in the fallback language with any language

This doesn't work, because a browser configured for "en,fr" priority
would get the "fr" page unless there is a specifcally designated
"en" page.  The work-around I suggested is to include BOTH an "en"
page and a page with no identified language as the fall-back.

>  - use type map files and use the qs= feature in there to set the source
>    quality of the document in the fallback language higher than the
>    others.

I haven't looked into type maps yet, but I have a feeling they would
require a major rearchitecture of the docs.

For the benefit of new-httpd folks dropped in on this discussion,
the problem is that many people have incorrectly configured browsers which
do not list "en" in their accept-languages, even when they do in fact read
pages in english.  This is causing hundreds of "no acceptable variant"
errors per day on the "multi-views" negotiated
pages under httpd.apache.org/docs/.

So far the proposed solutions are:

1. Include a "copy" of the english page as (eg) index.html.html.
This page has no specified language, and would therefore be used
as a fallback page when language-negotiation fails.

2. Change Apache to include a directive ("FallbackLanguage"?)
which can designate one of the files as the one to send when
language negotiation fails.

3. Use type maps.  I have yet to investigate this solution,
so I don't know if it is workable.

Can anyone here comment on the feasibility/sensibility of number 2?

Joshua.



Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Koen Holtman wrote:
>
> - Have you looked into the LanguagePriority directive?

I'm pretty sure that LanguagePriority does not solve our problem.

>
> If LanguagePriority does not work for you, alternative tricks that might
> work are:
>
>  - do not mark the documents in the fallback language with any language

This doesn't work, because a browser configured for "en,fr" priority
would get the "fr" page unless there is a specifcally designated
"en" page.  The work-around I suggested is to include BOTH an "en"
page and a page with no identified language as the fall-back.

>  - use type map files and use the qs= feature in there to set the source
>    quality of the document in the fallback language higher than the
>    others.

I haven't looked into type maps yet, but I have a feeling they would
require a major rearchitecture of the docs.

For the benefit of new-httpd folks dropped in on this discussion,
the problem is that many people have incorrectly configured browsers which
do not list "en" in their accept-languages, even when they do in fact read
pages in english.  This is causing hundreds of "no acceptable variant"
errors per day on the "multi-views" negotiated
pages under httpd.apache.org/docs/.

So far the proposed solutions are:

1. Include a "copy" of the english page as (eg) index.html.html.
This page has no specified language, and would therefore be used
as a fallback page when language-negotiation fails.

2. Change Apache to include a directive ("FallbackLanguage"?)
which can designate one of the files as the one to send when
language negotiation fails.

3. Use type maps.  I have yet to investigate this solution,
so I don't know if it is workable.

Can anyone here comment on the feasibility/sensibility of number 2?

Joshua.



Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.
On Mon, 29 Jan 2001, James Sutherland wrote:

> On Mon, 29 Jan 2001, Joshua Slive wrote:
> 
> > On Mon, 29 Jan 2001, Chris Pepper wrote:
> > > 	A DefaultLanguage directive (defaulting to en), specifying
> > > the preferred language(s) for browsers that don't specify their own
> > > preference, seems like the right way to do it.
> > 
> > Thanks for the feedback Chris and James.  I don't disagree with the
> > conclusion.  I should point out, to avoid confusion, that Apache does
> > have a DefaultLanguage directive, but it DOES NOT do what we want. 
> 
> Yes - I remembered seeing it somewhere, but not doing this :-(
> 
> > It just specifies the language associated with all non-specified
> > files.  What we want is a directive that will indicate what file to
> > send when no acceptable variants are found.
> 
> Yes... FallbackLanguage??
> 
> > I get the feeling, however, that we are all talking about something that
> > we really don't know much about.  I wish we had some real language
> > negotation experts here.
> 
> Apparently there are some on new-httpd; CC-ed there in case they can help.

Only seeing the message text above, I don't believe that I fully
understand the context of the question, but...

- Have you looked into the LanguagePriority directive?

I'm not sure if that does what you want, I am a bit confused about the
text about `Correctly implemented HTTP/1.1 requests will mean this
directive has no effect.' in the docs for LanguagePriority.  I have not
read the source yet to find out what this really means.

If LanguagePriority does not work for you, alternative tricks that might
work are:

 - do not mark the documents in the fallback language with any language
 - use type map files and use the qs= feature in there to set the source
   quality of the document in the fallback language higher than the
   others.

Both of these force the negotiation algorithm into the desired (I think)  
behavior, but both are not perfect solutions..

Koen.



Re: Language Negotiation: "No Acceptable Variant"

Posted by Koen Holtman <ko...@hep.caltech.edu>.
On Mon, 29 Jan 2001, James Sutherland wrote:

> On Mon, 29 Jan 2001, Joshua Slive wrote:
> 
> > On Mon, 29 Jan 2001, Chris Pepper wrote:
> > > 	A DefaultLanguage directive (defaulting to en), specifying
> > > the preferred language(s) for browsers that don't specify their own
> > > preference, seems like the right way to do it.
> > 
> > Thanks for the feedback Chris and James.  I don't disagree with the
> > conclusion.  I should point out, to avoid confusion, that Apache does
> > have a DefaultLanguage directive, but it DOES NOT do what we want. 
> 
> Yes - I remembered seeing it somewhere, but not doing this :-(
> 
> > It just specifies the language associated with all non-specified
> > files.  What we want is a directive that will indicate what file to
> > send when no acceptable variants are found.
> 
> Yes... FallbackLanguage??
> 
> > I get the feeling, however, that we are all talking about something that
> > we really don't know much about.  I wish we had some real language
> > negotation experts here.
> 
> Apparently there are some on new-httpd; CC-ed there in case they can help.

Only seeing the message text above, I don't believe that I fully
understand the context of the question, but...

- Have you looked into the LanguagePriority directive?

I'm not sure if that does what you want, I am a bit confused about the
text about `Correctly implemented HTTP/1.1 requests will mean this
directive has no effect.' in the docs for LanguagePriority.  I have not
read the source yet to find out what this really means.

If LanguagePriority does not work for you, alternative tricks that might
work are:

 - do not mark the documents in the fallback language with any language
 - use type map files and use the qs= feature in there to set the source
   quality of the document in the fallback language higher than the
   others.

Both of these force the negotiation algorithm into the desired (I think)  
behavior, but both are not perfect solutions..

Koen.



Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Mon, 29 Jan 2001, Joshua Slive wrote:

> On Mon, 29 Jan 2001, Chris Pepper wrote:
> > 	A DefaultLanguage directive (defaulting to en), specifying
> > the preferred language(s) for browsers that don't specify their own
> > preference, seems like the right way to do it.
> 
> Thanks for the feedback Chris and James.  I don't disagree with the
> conclusion.  I should point out, to avoid confusion, that Apache does
> have a DefaultLanguage directive, but it DOES NOT do what we want. 

Yes - I remembered seeing it somewhere, but not doing this :-(

> It just specifies the language associated with all non-specified
> files.  What we want is a directive that will indicate what file to
> send when no acceptable variants are found.

Yes... FallbackLanguage??

> I get the feeling, however, that we are all talking about something that
> we really don't know much about.  I wish we had some real language
> negotation experts here.

Apparently there are some on new-httpd; CC-ed there in case they can help.


James.


Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Mon, 29 Jan 2001, Joshua Slive wrote:

> On Mon, 29 Jan 2001, Chris Pepper wrote:
> > 	A DefaultLanguage directive (defaulting to en), specifying
> > the preferred language(s) for browsers that don't specify their own
> > preference, seems like the right way to do it.
> 
> Thanks for the feedback Chris and James.  I don't disagree with the
> conclusion.  I should point out, to avoid confusion, that Apache does
> have a DefaultLanguage directive, but it DOES NOT do what we want. 

Yes - I remembered seeing it somewhere, but not doing this :-(

> It just specifies the language associated with all non-specified
> files.  What we want is a directive that will indicate what file to
> send when no acceptable variants are found.

Yes... FallbackLanguage??

> I get the feeling, however, that we are all talking about something that
> we really don't know much about.  I wish we had some real language
> negotation experts here.

Apparently there are some on new-httpd; CC-ed there in case they can help.


James.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On Mon, 29 Jan 2001, Chris Pepper wrote:
> 	A DefaultLanguage directive (defaulting to en), specifying
> the preferred language(s) for browsers that don't specify their own
> preference, seems like the right way to do it.

Thanks for the feedback Chris and James.  I don't disagree with the
conclusion.  I should point out, to avoid confusion, that Apache does
have a DefaultLanguage directive, but it DOES NOT do what we want.  It
just specifies the language associated with all non-specified files.  What
we want is a directive that will indicate what file to send when no
acceptable variants are found.

I get the feeling, however, that we are all talking about something that
we really don't know much about.  I wish we had some real language
negotation experts here.

Joshua.


Re: Language Negotiation: "No Acceptable Variant"

Posted by Chris Pepper <pe...@mail.reppep.com>.
	I agree with James -- this should be solved with a directive, 
not additional files or symlinks. The case I was thinking of is a 
Japanese mirror of httpd.apache.org, where they can mirror the 
'master' content tree exactly, but specify in their local httpd.conf 
which language to 'prefer'.

	I don't love the current suffixes -- agree with Ken(?) it 
causes confusion between .html and .en on the same file, but it's the 
best we've got. I think we should avoid making '.html' a special 
language code if we can.

	A DefaultLanguage directive (defaulting to en), specifying 
the preferred language(s) for browsers that don't specify their own 
preference, seems like the right way to do it.


						Chris Pepper

At 9:18 AM +0000 2001/01/29, James Sutherland wrote:
>On Sun, 28 Jan 2001, Joshua Slive wrote:
>
>>  A quick look at the error logs on apache.org shows almost 500 "No
>>  Acceptable Variant" errors so far today.  Many of these errors are caused
>>  by people with misconfigured browsers trying to deal with our new
>>  language-negotiated manual.  (I am defining "misconfigured" as not
>>  including "en" for english in their browser language preferences, although
>  > that is an admittedly english-centric view of things.)

>Could we have an explicit "default language" - .default? Or a
>DefaultLanguage config directive, saying "If we don't have a page in the
>language they asked for, use this one"?


-- 
Chris Pepper:                   <http://www.reppep.com/~pepper/>
Rockefeller U Computing Services:  <http://www.rockefeller.edu/>
Mac OS X Software:                      <http://www.mosxsw.com/>

Re: Language Negotiation: "No Acceptable Variant"

Posted by James Sutherland <ja...@cam.ac.uk>.
On Sun, 28 Jan 2001, Joshua Slive wrote:

> A quick look at the error logs on apache.org shows almost 500 "No
> Acceptable Variant" errors so far today.  Many of these errors are caused
> by people with misconfigured browsers trying to deal with our new
> language-negotiated manual.  (I am defining "misconfigured" as not
> including "en" for english in their browser language preferences, although
> that is an admittedly english-centric view of things.)

Sounds fair: much of the WWW will turn out an English language page by
default, or even regardless of preferences.

> We discussed this once before, and concluded that there was nothing we
> could do about.  However, I now believe that this is not true.  If there
> is a file with with no language attribute associated with it, then Apache
> will serve that file in preference to the "No Acceptable Variant" error.
> So, for example, if we include a page called "index.html.html", then since
> this page has no language, it will be served as a "default" page.

Could we have an explicit "default language" - .default? Or a
DefaultLanguage config directive, saying "If we don't have a page in the
language they asked for, use this one"?

That way, companies which e.g. use www.company.com for English,
www.company.de for German etc., could use negotiation on both sites where
possible, but have .com fall back to English, .de fall back to German?

> So, I see three options:
> 
> 1. Leave things as they are and hope that people with misconfigured
> browsers fix them.

Perhaps; what's on the "No Acceptable Variant" error page ATM?? Does it
include instructions to check your browser config? Alternatively, just
list the variants available?

> 2. Put a page in index.html.html describing how to configure content
> negotiation (as in http://www.debian.org/intro/cn)

Hrmm... maybe...

> 3. Just symlink (can that be done in cvs?) index.html.html to
> index.html.en to make english the default page.  This could be done for
> every page where we add a translation.
> 
> I am leaning towards 3, but would like input on how this could be done in
> cvs.

3 is probably best, but an explicit directive DefaultLanguage would be
best; then companies could direct you to www.en.company.com,
www.de.company.com etc.

> In the future, as we get more translations, we should also do something
> more akin to the Debian model where each page lists all the translations
> available and a link to a "language help page".
> 
> Opinions?

Having a list of translations available on the front page would be nice,
which would send you to a directory with "Properly configured! You can now
browse this site in Foobarish" in Foobarish, and "Oops - your browser says
you prefer language Bar." in the others? A simple CGI to check if the
preferred language matches the one selected would do...


James.