Package: www.debian.org Severity: minor Tags: patch I think the browsers section ('Setting the preferred language in a browser') of https://www.debian.org/intro/cn.en.html can be improved by:
- removing old browsers (Netscape 3 and 4, old versions of Firefox). - renaming "Chromium" to "Chrome and Chromium" - removing the workaround for a bug in Konqueror (bug fixed in 2008) - sorting browsers alphabetically - adding W3C page about content negotiation, as suggested by pabs There is a patch attached to this message to do it. -- Stéphane
Index: cn.wml =================================================================== RCS file: /cvs/webwml/webwml/english/intro/cn.wml,v retrieving revision 1.90 diff -u -r1.90 cn.wml --- cn.wml 15 Aug 2014 14:36:25 -0000 1.90 +++ cn.wml 20 Jun 2015 12:46:58 -0000 @@ -150,21 +150,33 @@ <dl> - <dt><strong><toc-add-entry name="mozilla">Mozilla</toc-add-entry> / - <toc-add-entry name="netscape">Netscape 4.x</toc-add-entry> and later - versions</strong></dt> + <dt><strong><toc-add-entry name="chromium">Chrome and Chromium</toc-add-entry></strong></dt> + <dd> + <pre>Customize and control Chromium -> Settings -> Show advanced settings -> Languages -> Language and input settings</pre> + </dd> + + <dt><strong><toc-add-entry name="elinks">ELinks</toc-add-entry></strong></dt> + <dd>You can set up the default interface language at: + <pre> + Setup -> Language + </pre> + This will also change the requested language from web sites. + You can change this behaviour and fine-tune the accepted languages HTTP + variable at: + <pre> + Setup -> Options manager -> Protocols -> HTTP + </pre> + </dd> + + <dt><strong><toc-add-entry name="epiphany">Epiphany</toc-add-entry></strong></dt> <dd> <pre> - Edit -> Preferences -> Navigator -> Languages + Edit -> Preferences -> Language -> Languages </pre> - Note: with Netscape 4.x you need to make sure you select the - language from the available choices. A number of people - reported problems because they typed in the language by hand. </dd> - <dt><strong><toc-add-entry name="mozillafirefox">Mozilla Firefox</toc-add-entry></strong></dt> + <dt><strong><toc-add-entry name="mozillafirefox">Firefox</toc-add-entry></strong></dt> <dd> - Version 3.0 and newer:<br /> Linux: <pre> Edit -> Preferences -> Content -> Languages -> Choose... @@ -177,31 +189,27 @@ <pre> Firefox -> Preferences -> Content -> Languages -> Choose... </pre> + </dd> - <br /> - Version 1.5 and newer:<br /> - Linux: - <pre> - Edit -> Preferences -> Advanced -> General -> Edit Languages - </pre> - Windows: + <dt><strong><toc-add-entry name="galeon">Galeon</toc-add-entry></strong></dt> + <dd> <pre> - Tools -> Options -> Advanced -> General -> Edit Languages + Settings -> Preferences -> Rendering -> Languages </pre> + </dd> - <br /> - Version 0.9 and newer:<br /> - Linux: - <pre> - Edit -> Preferences -> General -> Languages - </pre> - Windows: + <dt><strong><toc-add-entry name="ibrowse">IBrowse</toc-add-entry></strong></dt> + <dd>Go into Preferences, then Settings, then Network. Under "Accept + language" it will probably show a "*" by default. If you click on the + "Locale" button it should add your preferred language. If not, you + can enter it manually. After that, click "OK". + </dd> + + <dt><strong><toc-add-entry name="icab">iCab</toc-add-entry></strong></dt> + <dd> <pre> - Tools -> Options -> General -> Languages + Edit -> Preferences -> Browser -> Fonts,Languages </pre> - - In older versions you have to go to <kbd>about:config</kbd> and change - the value of <kbd>intl.accept_languages</kbd>. </dd> <dt><strong><toc-add-entry name="iceweasel">Iceweasel</toc-add-entry></strong></dt> @@ -224,16 +232,26 @@ </pre> </dd> - <dt><strong><toc-add-entry name="pie">Pocket Internet Explorer</toc-add-entry></strong></dt> + <dt><strong><toc-add-entry name="konqueror">Konqueror</toc-add-entry></strong></dt> <dd> - # Windows Mobile 2003/2003SE/5.0 + Edit your + <kbd>~/.kde/share/config/kio_httprc</kbd> file to include a line like the + following: <pre> - Create the string registry key <q>AcceptLanguage</q> in - HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\\ - with value <q>fr; q=1.0, en; q=0.5</q> (without quotes). + Languages=fr;q=1.0, en;q=0.5 </pre> </dd> + <dt><strong><toc-add-entry name="lynx">Lynx</toc-add-entry></strong></dt> + <dd>You can either edit the <kbd>preferred_language</kbd> variable in your + <kbd>.lynxrc</kbd> or set it using the 'O' command while in lynx. + + <p>For example, use the following line in your <kbd>.lynxrc</kbd></p> + + <pre> + preferred_language=fr; q=1.0, en; q=0.5 + </pre> + </dd> <dt><strong><toc-add-entry name="opera">Opera</toc-add-entry></strong></dt> <dd>Most versions: @@ -254,45 +272,27 @@ </pre> </dd> - <dt><strong><toc-add-entry name="galeon">Galeon</toc-add-entry></strong></dt> - <dd> - <pre> - Settings -> Preferences -> Rendering -> Languages - </pre> - </dd> - - <dt><strong><toc-add-entry name="epiphany">Epiphany</toc-add-entry></strong></dt> + <dt><strong><toc-add-entry name="pie">Pocket Internet Explorer</toc-add-entry></strong></dt> <dd> + # Windows Mobile 2003/2003SE/5.0 <pre> - Edit -> Preferences -> Language -> Languages + Create the string registry key <q>AcceptLanguage</q> in + HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\\ + with value <q>fr; q=1.0, en; q=0.5</q> (without quotes). </pre> </dd> - <dt><strong><toc-add-entry name="konqueror">Konqueror</toc-add-entry></strong></dt> - <dd> - If you want to set only one language, it should be quite easy as soon as bug - <a href="https://bugs.debian.org/358459">#358459</a> is fixed, just select it - in the KDE Control Center and restart your KDE session in order to apply the - changes. - <br /> - If you want to have multiple languages set or need a workaround for the - mentioned bug, you currently have to edit your - <kbd>~/.kde/share/config/kio_httprc</kbd> file to include a line like the - following: + <dt><strong><toc-add-entry name="safari">Safari</toc-add-entry></strong></dt> + <dd>Safari uses the Mac OS X system preferences to determine your + preferred language: <pre> - Languages=fr;q=1.0, en;q=0.5 + System preferences -> International -> Language </pre> </dd> - <dt><strong><toc-add-entry name="lynx">lynx</toc-add-entry></strong></dt> - <dd>You can either edit the <kbd>preferred_language</kbd> variable in your - <kbd>.lynxrc</kbd> or set it using the 'O' command while in lynx. - - <p>For example, use the following line in your <kbd>.lynxrc</kbd></p> - - <pre> - preferred_language=fr; q=1.0, en; q=0.5 - </pre> + <dt><strong><toc-add-entry name="voyager">Voyager</toc-add-entry></strong></dt> + <dd>Go to Settings then Languages. You can either enter it manually + or click on "Get from locale". Click "OK" when done. </dd> <dt><strong><toc-add-entry name="w3">W3</toc-add-entry></strong> (emacs based web browser)</dt> @@ -302,68 +302,18 @@ <pre>Hypermedia -> URL -> Mime -> Mime Language String...</pre> </dd> - <dt><strong><toc-add-entry name="icab">iCab</toc-add-entry></strong></dt> - <dd> - <pre> - Edit -> Preferences -> Browser -> Fonts,Languages - </pre> - </dd> - <dt><strong><toc-add-entry name="w3m">W3M</toc-add-entry></strong></dt> <dd> <pre> Options (o) -> Other Behavior -> Accept-Language </pre> </dd> - - <dt><strong><toc-add-entry name="safari">Safari</toc-add-entry></strong></dt> - <dd>Safari uses the Mac OS X system preferences to determine your - preferred language: - <pre> - System preferences -> International -> Language - </pre> - </dd> - - <dt><strong><toc-add-entry name="elinks">ELinks</toc-add-entry></strong></dt> - <dd>You can set up the default interface language at: - <pre> - Setup -> Language - </pre> - This will also change the requested language from web sites. - You can change this behaviour and fine-tune the accepted languages HTTP - variable at: - <pre> - Setup -> Options manager -> Protocols -> HTTP - </pre> - </dd> - - <dt><strong><toc-add-entry name="netscape3">Netscape 3.x</toc-add-entry></strong></dt> - <dd>Add - <pre> - *httpAcceptLanguage: [preferred_language string] - </pre> - to the Netscape app-defaults file or <kbd>~/.Xresources</kbd> - </dd> - - <dt><strong><toc-add-entry name="ibrowse">IBrowse</toc-add-entry></strong></dt> - <dd>Go into Preferences, then Settings, then Network. Under "Accept - language" it will probably show a "*" by default. If you click on the - "Locale" button it should add your preferred language. If not, you - can enter it manually. After that, click "OK". - </dd> - - <dt><strong><toc-add-entry name="voyager">Voyager</toc-add-entry></strong></dt> - <dd>Go to Settings then Languages. You can either enter it manually - or click on "Get from locale". Click "OK" when done. - </dd> - - <dt><strong><toc-add-entry name="chromium">Chromium</toc-add-entry></strong></dt> - <dd> - <pre>Customize and control Chromium -> Settings -> Show advanced settings -> Languages -> Language and input settings</pre> - </dd> </dl> +<p>You can find additional informations about selecting language preferences on this +<a href="http://www.w3.org/International/questions/qa-lang-priorities">W3C page</a>.</p> + <p>If you have information on configuring a browser that isn't listed above, please send it to <a href="mailto:debian-www@lists.debian.org">debian-www@lists.debian.org</a>.</p>
#use wml::debian::template title="Debian web site in different languages" BARETITLE=true #use wml::debian::toc <protect pass=2> <: $lang = languages_footer(); $lang =~ s/<div id="/<div class ="/g; print $lang; :> </protect> <define-tag toc-title-formatting endtag="required">%body</define-tag> <define-tag toc-item-formatting endtag="required">[%body]</define-tag> <define-tag toc-display-begin><p></define-tag> <define-tag toc-display-end></p></define-tag> <p>Obviously, not everyone in the world uses the same language. As the web grows it is becoming more common to find pages that are available in multiple languages. A standard was therefore introduced, called <a href="$(HOME)/devel/website/content_negotiation">content negotiation</a>, that allows a person to set the language(s) they prefer to receive documents in. The actual version delivered is negotiated between your browser and the server; your browser sends its preferences and the server decides which version to send based on your preferences, and what versions of the document are available.</p> <p>Note that selecting a different language (from the available translations listed at the bottom of a page) will only show the current page in that language. It does <em>not</em> change the default language. If you click a link to a different page, it will be shown in the original language again. To change your <em>default</em> language, you need to change your language preferences in the configuration of your browser, as explained below.</p> <ul> <li><a href="#fix">What to do if a Debian web page is in the wrong language</a></li> <li><a href="#howtoset">How to set up the language settings</a></li> <li>Where to change the settings for the following browsers: <toc-display /></li> </ul> <hr /> <h2><a name="fix">What to do if a Debian web page is in the wrong language</a></h2> <p>The first and most common reason why a document is received in the wrong language from the Debian web server is an improperly configured browser. Please see the section on <a href="#howtoset">how to set the preferred language</a> on how to fix this.</p> <p>The second reason is a broken or a misconfigured cache. This is a growing problem as more ISPs see caching as a way of decreasing net traffic. Read the <a href="#cache">note on caching web servers</a> even if you don't think you are using one.</p> <p>The third reason is that there is a problem with <a href="https://www.debian.org/">www.debian.org</a>. Only a handful of problems with receiving the wrong language reported in the last several years were due to a bug at our end. We thus suggest that you investigate the first two sources of problems thoroughly before contacting us. If you find that <a href="https://www.debian.org/">https://www.debian.org/</a> is working, but one of the mirrors is not, report that to us and we will contact the mirror maintainers.</p> <p>After fixing any of these problems, we suggest that you clean out the local cache (both disk and memory) in your browser before trying to view pages again. We also suggest you use <a href="https://packages.debian.org/stable/web/lynx">lynx</a> when testing. It is the only browser we have found to comply 100% with the HTTP specifications for content negotiation.</p> <h3><a name="cache">Potential problems with proxy servers</a></h3> <p>Proxy servers are essentially web servers that have no content of their own. They sit in the middle between users and real web servers. They grab your requests for web pages and fetch the page. After that, they forward the page to you but also make a local, cached copy, for later requests. This can really cut down on network traffic when many users request the same page.</p> <p>This is a great idea most of the time, but it fails when the cache is buggy. In particular, some older proxy servers do not understand content negotiation. This results in them caching a page in one language and serving that, even if a different language is requested later. The only solution is to upgrade or replace the caching software.</p> <p>Historically, people only used a proxy when they configured their browser to use one. This is no longer the case. Your ISP may be redirecting all HTTP requests through a transparent proxy. If the proxy doesn't handle content negotiation properly, then users can receive cached pages in the wrong language. The only way you can fix this is to complain to your ISP in order for them to upgrade or replace their software.</p> <hr /> <h2><a name="howtoset">How to set up the language settings</a></h2> <p>You should set the preferred language to all the languages you speak, ordered by your preference. It is a good idea to add English ('en') as a backup (last in the list) because the original language of the Debian web pages is English and not all documents may be translated into your preferred language(s).</p> # translators can modify the below example to mention their language <p>For example, if you are a native French speaker, you would want to set your language variable to include first the French language (with the language code '<code>fr</code>'), followed by English (with the language code '<code>en</code>').</p> <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 present you 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> <p><strong>We strongly recommend that you do not add country extensions to a language unless you have good reason</strong>. If you do add one, make sure you also include the language without the extension.</p> <p>Explanation: A server that receives a request for a document with a preferred language of 'en-GB, fr' will not serve the English ('en') version before the French version. It will only serve the English document before the French one if there is a version of the file with 'en-gb' for the language extension. </p> <p>Thus, you should configure your browser to send 'en-GB, en, fr' or simply 'en, fr'. It does work the other way though, e.g. a server can return 'en-us' when 'en' is requested.</p> <p>For more information about setting the preferred language variable see the <a href="http://httpd.apache.org/docs/2.2/content-negotiation.html">Apache documentation on content negotiation</a>.</p> <h3><a name="setting">Setting the preferred language in a browser</a></h3> <p>To set the default language in your browser you have to set a variable that gets passed to the web server. How this is done depends on the browser you are using.</p> <dl> <dt><strong><toc-add-entry name="chromium">Chrome and Chromium</toc-add-entry></strong></dt> <dd> <pre>Customize and control Chromium -> Settings -> Show advanced settings -> Languages -> Language and input settings</pre> </dd> <dt><strong><toc-add-entry name="elinks">ELinks</toc-add-entry></strong></dt> <dd>You can set up the default interface language at: <pre> Setup -> Language </pre> This will also change the requested language from web sites. You can change this behaviour and fine-tune the accepted languages HTTP variable at: <pre> Setup -> Options manager -> Protocols -> HTTP </pre> </dd> <dt><strong><toc-add-entry name="epiphany">Epiphany</toc-add-entry></strong></dt> <dd> <pre> Edit -> Preferences -> Language -> Languages </pre> </dd> <dt><strong><toc-add-entry name="mozillafirefox">Firefox</toc-add-entry></strong></dt> <dd> Linux: <pre> Edit -> Preferences -> Content -> Languages -> Choose... </pre> Windows: <pre> Tools -> Options -> Content -> Languages -> Choose... </pre> Mac OS: <pre> Firefox -> Preferences -> Content -> Languages -> Choose... </pre> </dd> <dt><strong><toc-add-entry name="galeon">Galeon</toc-add-entry></strong></dt> <dd> <pre> Settings -> Preferences -> Rendering -> Languages </pre> </dd> <dt><strong><toc-add-entry name="ibrowse">IBrowse</toc-add-entry></strong></dt> <dd>Go into Preferences, then Settings, then Network. Under "Accept language" it will probably show a "*" by default. If you click on the "Locale" button it should add your preferred language. If not, you can enter it manually. After that, click "OK". </dd> <dt><strong><toc-add-entry name="icab">iCab</toc-add-entry></strong></dt> <dd> <pre> Edit -> Preferences -> Browser -> Fonts,Languages </pre> </dd> <dt><strong><toc-add-entry name="iceweasel">Iceweasel</toc-add-entry></strong></dt> <dd> <pre> Edit -> Preferences -> Content -> Languages -> Choose </pre> </dd> <dt><strong><toc-add-entry name="ie">Internet Explorer</toc-add-entry></strong></dt> <dd>Windows: <pre> Tools or View or Extras -> Internet Options -> (General) Languages </pre> </dd> <dd>Mac OS: <pre> Edit -> Preferences -> Web Browser -> Language/Fonts </pre> </dd> <dt><strong><toc-add-entry name="konqueror">Konqueror</toc-add-entry></strong></dt> <dd> Edit your <kbd>~/.kde/share/config/kio_httprc</kbd> file to include a line like the following: <pre> Languages=fr;q=1.0, en;q=0.5 </pre> </dd> <dt><strong><toc-add-entry name="lynx">Lynx</toc-add-entry></strong></dt> <dd>You can either edit the <kbd>preferred_language</kbd> variable in your <kbd>.lynxrc</kbd> or set it using the 'O' command while in lynx. <p>For example, use the following line in your <kbd>.lynxrc</kbd></p> <pre> preferred_language=fr; q=1.0, en; q=0.5 </pre> </dd> <dt><strong><toc-add-entry name="opera">Opera</toc-add-entry></strong></dt> <dd>Most versions: <pre> File -> Preferences -> Languages </pre> </dd> <dd>Linux/*BSD versions 5.x and 6.x: <pre> File -> Preferences -> Document -> Languages </pre> </dd> <dd>Nokia 770 Web Browser: Edit the file /home/user/.opera/opera.ini and add the following line in the section [Adv User Prefs]: <pre> HTTP Accept Language=fr;q=1.0,en;q=0.5 </pre> </dd> <dt><strong><toc-add-entry name="pie">Pocket Internet Explorer</toc-add-entry></strong></dt> <dd> # Windows Mobile 2003/2003SE/5.0 <pre> Create the string registry key <q>AcceptLanguage</q> in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\\ with value <q>fr; q=1.0, en; q=0.5</q> (without quotes). </pre> </dd> <dt><strong><toc-add-entry name="safari">Safari</toc-add-entry></strong></dt> <dd>Safari uses the Mac OS X system preferences to determine your preferred language: <pre> System preferences -> International -> Language </pre> </dd> <dt><strong><toc-add-entry name="voyager">Voyager</toc-add-entry></strong></dt> <dd>Go to Settings then Languages. You can either enter it manually or click on "Get from locale". Click "OK" when done. </dd> <dt><strong><toc-add-entry name="w3">W3</toc-add-entry></strong> (emacs based web browser)</dt> <dd> <pre>(setq url-mime-language-string "preferred_language=fr; q=1.0, en; q=0.5")</pre> or using the custom package (assuming URL version p4.0pre.14): <pre>Hypermedia -> URL -> Mime -> Mime Language String...</pre> </dd> <dt><strong><toc-add-entry name="w3m">W3M</toc-add-entry></strong></dt> <dd> <pre> Options (o) -> Other Behavior -> Accept-Language </pre> </dd> </dl> <p>You can find additional informations about selecting language preferences on this <a href="http://www.w3.org/International/questions/qa-lang-priorities">W3C page</a>.</p> <p>If you have information on configuring a browser that isn't listed above, please send it to <a href="mailto:debian-www@lists.debian.org">debian-www@lists.debian.org</a>.</p>