On 5 Apr 2006, at 12:26, limodou wrote:

> Why you need do this? Because django can auto judge the language from
> your browser request http head, or context settings, or settings. If
> you like , you can provide a language selection in web page, and
> that's enough. The url doesnot need to be special processed I think.

I for one much prefer the language to be specified in the URL rather  
than being derived from the browser settings. I would prefer this  
behaviour to be supported (at least as an option) in Django core. I  
know that language detection based on browser HTTP headers is a  
feature of the HTTP specification, but personally I believe that it's  
a mistake in the spec. Here's my reasoning:

1. Serving up content from the same URL in a different language  
depending on browser settings is an idea that is based on the ideal  
situation where each translation is a perfect representation of the  
content's underlying meaning. This is clearly not a realistic  
proposition. Some languages have phrases that do not perfectly  
translate to other languages, and translations may not be perfect in  
any case due to human error. The French version of a page is  
fundamentally different from the English version, and I believe that  
the URL should reflect that.

2. Passing URLs around. If I copy and paste the URL of a page and  
send it to a friend / post it to my weblog, my expectation is that  
they will see exactly what I see. Likewise, if I quote something and  
cite the original URL, my expectation is that I'm pointing back to  
the source of that quote. Changing the content based on the language  
header breaks that expectation. Again, I know it's part of the HTTP  
spec - but it's so rarely implemented that very few users expect it  
to happen.

3. Related to the above: What if I spot a typo in a page and want to  
report it to the site owner? Sending them the URL is no longer enough  
- I have to tell them my browser's language setting as well.

Given the above, I much prefer the approach taken by most sites that  
feature content in multiple languages where the language code is  
included somewhere in the URL.

That's not to say that the user's browser language setting should be  
ignored - you can use it to inform them that the page is available in  
their preferred language (maybe with a nice big note at the top of  
the page, written in their native language of course).

Tim Berners-Lee and the W3C may disagree with me on this one, but I'm  
convinced that using URLs to distinguish between languages is smarter  
than relying on browser settings alone.

Cheers,

Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to