[Catalyst] Multi-language and REST

Ian Docherty catalyst at iandocherty.com
Fri Apr 25 16:55:48 BST 2008


Dave Rolsky wrote:
> On Fri, 25 Apr 2008, Ian Docherty wrote:
>
>>> http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z12
>>>
>> Yes, I have done this previously, it is elegant, but not RESTful and 
>> does not make it easy for users to change their settings on a 
>> site-by-site basis dynamically, as you could if you provided a 
>> language selection box on each page.
>
> Why do you say it's not RESTful?
>
> I think it's very RESTful, but it depends on how you think about it. 
> If the language of the content is basically an issue of "formatting", 
> then switching language based on a header is perfect. The client 
> provides sufficient information to produce a correct response _on each 
> request_ as part of HTTP. This is basically the essence of REST.
>
> OTOH, if you consider each language's content fundamentally separate 
> things, then each language should have its own set of URIs.
Yes, this is exactly what I had in mind. I did not (and still don't) 
consider the language of the content as 'formatting', the content for 
each language is different (in my mind).

I don't really want this to start another flame-war about RESTful etc. 
this point is outside of my original request so I won't respond (on 
list) to this off-topic subject any more.

Regards
Ian



More information about the Catalyst mailing list