[Catalyst] Multi-language and REST
Ian Docherty
catalyst at iandocherty.com
Fri Apr 25 15:12:14 BST 2008
Knut-Olav Hoven wrote:
> On Friday 25 April 2008 14:44:38 Ian Docherty wrote:
> =
>> I have been pondering how to take an existing Catalyst application and
>> make it multi-lingual.
>>
>> I would prefer to use a RESTful method, so this would translate /foo/bar
>> to /en/foo/bar or /fr/foo/bar (for English and French respectively).
>> =
>
> The elegang solution is to make use of the request header Accept-Language=
, but =
> not many users know how to change this setting in their browsers.
>
> 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.
> =
>> The problem as I see it is how to do this. I don't want to move all my
>> controllers, e.g. MyApp::Controller::Foo::Bar to
>> MyApp::Controller::Lang::Foo::Bar
>>
>> What other alternatives are there?
>>
>> Regards
>> Ian
>>
>> _______________________________________________
>> List: Catalyst at lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.=
uk/
>> Dev site: http://dev.catalyst.perl.org/
>> =
>
>
>
> =
> ------------------------------------------------------------------------
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.u=
k/
> Dev site: http://dev.catalyst.perl.org/
> =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080425/14ac1=
78d/attachment.htm
More information about the Catalyst
mailing list