[Catalyst] Language selection in URLs

Simon Wilcox simonw at digitalcraftsmen.net
Sun Nov 15 16:08:51 GMT 2009

On 15/11/09 15:23, Joel Bernstein wrote:
> A better question is: what kind of problems are you solving where
> server-driven or agent-driven content negotiation as described in the
> HTTP 1.1 RFC (an excellent and very readable document, honestly) are
> insufficient?

How do you easily change the Accept-Language header in $modern_browser[1] ?

If I'm using my friend's laptop (he's a Finn), letting it choose to show 
me a page in Finnish isn't much use to me as I speak not a word.

OK, so that's a slightly contrived example but equally important is 
making content in multiple languages accessible to search engine 
spiders. In this instance you need to be able to disambiguate the 
content via the URI since that is all you have. You need to provide them 
with a link to different language versions in the form of a URI since 
they don't spider the web multiple times with different Accept: headers 
to see what they get. As a content provider one has to be a bit more 
explicit about it.

[1] I know how to do it in Firefox, no idea in other browsers and in the 
real world, clicking on a link that says "English" is easier than trying 
to work out the vagaries of each browser UI.

More information about the Catalyst mailing list