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

Bug#268381: www.debian.org: German mirror does not honor browsers's language settings



tags 268381 patch
thanks

On Mon, Aug 30, 2004 at 11:37:10AM +0200, Gerfried Fuchs wrote:
> * "Gabor Kiss [Bitman]" <kissg@cdata.hu> [2004-08-30 09:03]:
> >> Which languages do you have selected? www.de.d.o has apache2 for some
> >> weeks now, which seems to handle some things differently, still
> >> investigating...
> > 
> > 1. Hungarian
> > 2. English
> > 
> > user_pref("intl.accept_languages", "hu, en");
> 
>  You should set a quality mark for the languages, then.
> "hu;q=1.0, en;q=0.5" works as expected.
> 
>  Apache2 seems to see non-qualified qualities as 1.0 (like it is
> specified, iirc) and because they are the same it ranks the languages
> according to the ordering in the webserver settings.
> 
>  We should document that more throughly on /intro/cn, I guess.

Proposal for a patch:
Index: english/intro/cn.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/intro/cn.wml,v
retrieving revision 1.57
diff -u -r1.57 cn.wml
--- english/intro/cn.wml	16 Sep 2004 14:41:50 -0000	1.57
+++ english/intro/cn.wml	17 Sep 2004 00:19:10 -0000
@@ -92,6 +92,17 @@
 <p>See below for <a href="#setting">exact instructions on how to do this in
 specific browsers</a>.</p>
 
+<p>As you can see there, most browsers will you present with some kind
+of user interface that will hide some of the details about defining
+your preferred language. If this isn't the case please note one
+important simplification in the previous paragraph: If you're just
+specifying a list of languages like 'fr, en' this doesn't yet define
+a preference, but equally ranked options and the server may decide to
+ignore their ordering. If you want to specify real preference you have
+to use "quality values" which are floating point values between 0 and 1
+where higher values indicate higher preference. So in the case above
+you would probably use something like 'fr; q=1.0, en; q=0.5'.</p>
+
 <p>One thing you need to be careful of is using sub-categories of languages.
 Using 'en-GB, fr', for example, does not do what most people expect (if they
 have not read the HTTP specification).</p>

Comments welcome.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/



Reply to: