Web Servers on Unix and Linux - Mulit-language settings in Apache server

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > March 2007 > Mulit-language settings in Apache server





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mulit-language settings in Apache server
bluevox@gmail.com

2007-03-07, 1:25 am

As I remember if I made a settings on Apache like this:

AddDefaultCharset UTF-8

Then I can only use this charset, but now I'm facing a problem that my
client requesting for multi-language support (big5, gb2312, etc). And
I cannot simply remark the upper Apache script because it will affect
another website in the server and also I cannot change the client
program code anymore(eg: change file name into xxx.php.fr to support
French), what can I do to overcome this problem?

Many thanks.

Nick Kew

2007-03-07, 7:21 am

On 6 Mar 2007 18:23:21 -0800
bluevox@gmail.com wrote:

> As I remember


Why? We have the luxury of this little thing called the Internet,
which means you can look that kind of thing up.

> if I made a settings on Apache like this:
>
> AddDefaultCharset UTF-8
>
> Then I can only use this charset,


The documentation of AddDefaultCharset tells you to what extent
that is true, and points to how you can override it.


> (eg: change file name into xxx.php.fr to support
> French), what can I do to overcome this problem?


Then look at the documentation of content negotiation for
why that approach will work fine, too.


--
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
Andreas Prilop

2007-03-07, 1:18 pm

On Wed, 6 Mar 2007, bluevox@gmail.com wrote:

> As I remember if I made a settings on Apache like this:
> AddDefaultCharset UTF-8
> Then I can only use this charset,


Wrong. This is the encoding (charset) for documents that
have no encoding (charset) specified otherwise. For example,
you could write into your .htaccess file:

AddCharset iso-8859-1 1
AddCharset iso-8859-2 2
AddCharset iso-8859-5 5

Then your documents mypage.html.1 anotherpage.html.2
yetanotherpage.html.5 have the encodings ISO-8859-1,
ISO-8859-2, and ISO-8859-5, resp. The URLs could be
written as

http://www.example.com/mypage.html
http://www.example.com/anotherpage.html
http://www.example.com/yetanotherpage.html

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sea...:Alan.J.Flavell
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com