Re: Defining the language of a document

First of all,

    thanks a lot for your precious contribution to my *enigma* ... :-)

    I am trying the different solutions you proposed, and the more I try, 
the more I think that there is *no best solution*. They are all right, but 
they can be more depending on the case.

    Anyway, I want to ask you for some comments about the solution of the 
directory splitting, which doesn't involve any content-negotiation. It is 
just for giving back the user information about the language of the 
documents with an HTTP header (which is stronger than the HTML and it is 
valid also for other media types). However, I hope this example clearify my 
thoughts:

- PER DIRECTORY STRUCTURE

    I can have this case in my situation, where by default a topic is in 
italian and I can have translations in other languages by putting the ISO 
code of it (i.e. en).

    So, assuming the topic is 'arts', I have this situation:

[htdocs/arts]
    index.htm    [italian home page]
[htdocs/arts/en]
    index.htm    [english home page]

I tried to set the DefaultLanguage for the Apache server configuration, but 
a 406 error appears if I don't set the language to 'en' when accessing 
documents inside. So I decided to go for this solution, and let me know 
what you think. I can put an .htaccess file this way:

[htdocs/arts/.htaccess]
# Set the default language for this directory to italian
Header set Content-Language it

[htdocs/arts/en/.htaccess]
# Set the default language for this directory to english
Header set Content-Language en

By doing this, I prevent the 406 message to come up and ... well, I think 
it is a reasonable solution. However, I am pretty open to comments, 
cryticisms and suggestion coming from anybody of you! :-)

Ciao and thanks
-Gabriele

--
Gabriele Bartolini - Computer Programmer
U.O. Rete Civica - Comune di Prato - Prato - Italia - Europa
g.bartol@comune.prato.it | http://www.po-net.prato.it/

  The nice thing about Windows is - It does not just crash,
  it displays a dialog box and lets you press 'OK' first.

Received on Friday, 28 December 2001 05:50:43 UTC