(*** This bug was imported into bugs.kde.org ***) Package: khtml Version: 3.0 (KDE 2.0.1) Severity: wishlist Compiler: gcc version 2.95.2 20000220 (Debian GNU/Linux) OS: Linux 2.4.0-test11 i686 (Debian Package 4:2.0.1-0.potato4) using konqueror for the first time I have a hard time finding out how I set the browser's "Accept-Language:"- header that is sent to servers in order to select an approprite language. Is this possible? Good luck Karsten Tinnefeld -- Karsten Tinnefeld tinne@kati.ping.de Silberknapp 68 T +49 231 755-4737/+49 231 773812 44227 Dortmund Deutschland F +49 231 755-2047
On Monday 05 February 2001 12:48 Karsten Tinnefeld wrote: > Package: khtml > Version: 3.0 (KDE 2.0.1) > Severity: wishlist > Compiler: gcc version 2.95.2 20000220 (Debian GNU/Linux) > OS: Linux 2.4.0-test11 i686 (Debian Package 4:2.0.1-0.potato4) > > using konqueror for the first time I have a hard time finding out how I set the browser's "Accept-Language:"- > header that is sent to servers in order to select an approprite language. Is this possible? It's done automatically from the language you select in KControl's "Personalization and Language" page. I guess the wish is to make it configurable (specifically for HTTP) ? -- David FAURE david@mandrakesoft.com faure@kde.org http://perso.mandrakesoft.com/~david/ http://www.konqueror.org/ KDE Making The Future of Computing Available Today
> > Package: khtml > > Version: 3.0 (KDE 2.0.1) > > Severity: wishlist > > using konqueror for the first time I have a hard time finding out how = I set the browser's "Accept-Language:"- > It's done automatically from the language you select in KControl's > "Personalization and Language" page. > I guess the wish is to make it configurable (specifically for HTTP) ? Ok thanks now I understand how it works. Making it configurable separately has two pros that would suggest this coul= d be the right way maybe by having a "use kcontrol settings" default: * using languages that are not provided as a kde locale (does not apply to = any of the languages I know anything about) * quickly switching back and fro for tests of content-negotiating languages (actually it was this last item that brought me to search for konquerers o= ptions) Maybe a sufficient reason for giving the extra configuration options maybe= not. Anyhow language control via kcontrol is not obvious in my eyes and = should be documented somewhere. Karsten
The way language negotiation works now is less than ideal for Norwegians. First of all the code for Norwegian Nynorsk is the unofficial 'no_NY' while web pages use 'nn'. If a Norwegian Nynorsk page doesn't exist the next best option should be to request a Norwegian page with code 'no'. Similarly Norwegian Bokmål users should first be served with the code 'nb' although the KDE code for Bokmål is 'no'. If there is no 'nb' page the user should get the 'no' page. If both Norwegian Bokmål and Nynorsk followed the standards they should (for various reasons they don't -- we should use correct codes) they would be named 'nb' and 'nn'. Then with Konqueror's current behaviour the users would never get 'no' (Norwegian) pages at all. By far the most widely used language code is 'no' which simply means 'Norwegian' regardless of the Bokmål/Nynorsk variant. Confused? Well the only solution is to make the Accept-Language function customizable *and* localizable. And if it's not already possible make it a prioritized list. The W3C points this out in their list of 'Common User Agent Problems': ------- 1.13 Use the user interface language as the default value for language negotiation. The user should be allowed to specify the set of languages that the user agent may use for language negotiation. In case the user does not specify any language the user agent may use the language of its user interface as the value sent out. The user agent should allow the user to override this behavior. ------- <URL: http://www.w3.org/TR/2001/NOTE-cuap-20010206 > Regards Gaute Hvoslef Kvalnes Norwegian (Nynorsk) KDE: http://i18n.kde.org/teams/no_NY/
First: > Severity: wishlist I consider the severity of this problem much closer to "critical" than to "wishlist". Second: > It's done automatically from the language you select in > KControl's "Personalization and Language" page. I guess > the wish is to make it configurable (specifically for > HTTP) ? There is no need to do anything specific for HTTP. It is generally useful for programs to be able to query which languages the user can understand. And most users (except for the French and USA'ans) _can_ understand more than one language. Third: (this belongs in the wishlist category) It would be very appropriate if a user the first time he or she runs KDE is asked the very basic questions: Which languages can you read? (please order them with the ones you are best at at the top) Which country are you in? Jacob -- "Preserve wildlife pickle a duck."
I found this bug because my website http://reviewed.homelinux.org/ serves pages based on the users browsers language string. This currently does NOT WORK AT ALL with Konqueror, it seems. The apache2 configuration goes.. <IfModule mod_negotiation.c> LanguagePriority en nb no nn en fr de es it da nl et el ja kr pl pt pt-br ru ltz ca sv tw ForceLanguagePriority Fallback </IfModule> I am using KDE 3.2.2. I have set Norwegian (Norsk Bokmål) then Swedish as languages in kcontrol. Using PHP I get $browserlang returned as "nb, no, sv, en", yet KDE for some reason displays the pages on that site in English by default. When using Epiphany and "NyNorsk" $browserlang returns nn,nb;q=0.7,en;q=0.3 and pages on my site are delivered in the correct language. I also tested using nn or nb as first priority in Opera, Firefox, Mozilla, Galeon and Lynx. ALL of those will display the pages on my site in Norwegian! But Konqueror insists on using the English version. I assume this because all the other browsers use the Q= to prioritize languages (and this is respected by my server config). Having no and en in Mozilla would ask for "no,en;q=0.5" (thus giving norwegian content). I found that I can workaround this by using PHP and something like "if (strpos($browserlang, 'no')" to determine if people understands that language and "else" serve English (as I have done on http://oyvinds.everdot.org/ ) but this is no ideal or good solution. This does just check the visitors capabilities and force a language on them without giving them alternatives or letting them prioritize: There ar;q=1.0,en;q=0.9,nb;q=0.8 shows the page in nb (Norwegian) even though the string clearly states English is a higher priority than nb.
To cast some more light on this issue, a config "LanguagePriority nb en" and "ForceLanguagePriority Prefer Fallback" would ofcource return Norwegian to Norwegian users in Konqueror, but also force this language on all users without en or nb (say es only) in the user strings - But if the user does not ask for any of the accepted languages it is much more probable they understand "en" than "nb" (This could also be solved by apache supporting a different LanguagePritority scheme for "Prefer" and "Fallback", but again, Konqueror is the only thing that does this wrong).
*** This bug has been marked as a duplicate of 22514 ***