Renaud Drousies wrote:
> Hello,
>
> I am trying to figure out what would be the best way to have a
> multilanguage support in a catalyst application.
>
> I thought using a url-based method might be better since this site could
> be visited by people that do not accept cookies, or do not visit it from
> their home computer (and then could not have the Accept-Language header
> set correctly).
sub lang :Chained('/') :CaptureArgs(1) :PathPart('') {
my ($self, $c, $lang) = @_;
<set lang appropriately>
}
sub foo :Chained('/lang') :Args(0) { # /en/foo etc.
Chained was designed to support this sort of stuff without the need for
prepare_path hacks, which I've used before but always found a tad ugly.
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/