W3C home > Mailing lists > Public > www-international@w3.org > October to December 2002

Re: setting language in http

From: Martin Duerst <duerst@w3.org>
Date: Tue, 01 Oct 2002 14:20:35 +0900
Message-Id: <4.2.0.58.J.20021001124153.044f8bf0@localhost>
To: Tex Texin <tex@i18nguy.com>, jarkko.hietaniemi@nokia.com, www-international@w3.org

At 16:38 02/09/25 -0400, Tex Texin wrote:

>However, if someone knows how to set the content-language in http in a
>.htaccess file that would be appreciated.
>The commands I tried, I am either not privileged to use (and the ISP
>won't tell which I am priv'd for and which I am not) or don't work as I
>expect.


This is what I copied from our server:

 >>>>>>
# AddLanguage allows you to specify the language of a document. You can
# then use content negotiation to give a browser a file in a language
# it can understand.  Note that the suffix does not have to be the same
# as the language keyword --- those with documents in Polish (whose
# net-standard language code is pl) may wish to use "AddLanguage pl .po"
# to avoid the ambiguity with the common suffix for perl scripts.

AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it

# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
# Just list the languages in decreasing order of preference.

LanguagePriority en fr de
 >>>>>>>>

For language negotiation,
http://httpd.apache.org/docs/content-negotiation.html
says:
Content negotiation is provided by the mod_negotiation module,
which is compiled in by default.

So not too much fear of ISPs here. Also,
http://httpd.apache.org/docs/mod/mod_mime.html#addlanguage
says:
Context: server config, virtual host, directory, .htaccess
So you should be able to set this in your .htaccess file,
similar to 'charset'. Can you try it?


Regards,    Martin.
Received on Tuesday, 1 October 2002 01:20:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:16:59 GMT