Re: [Catalyst] Multilanguage application

2006-08-25 Thread Daniel McBrearty
sub lang : Chained('/') CaptureArgs(1) PathPart(''){ my ($self, $c, $lang) = @_; # need to check that $lang is valid and handle that here if (valid($lang)) { } else { } } sub doit : Chained('lang') Args(0) { my ($self, $c) = @_; } this now matches /*/doit, and doit needs to be able

Re: [Catalyst] Multilanguage application

2006-08-25 Thread A. Pagaltzis
* Daniel McBrearty [EMAIL PROTECTED] [2006-08-25 12:10]: in fact there are a number of ways the language can be detected. For me, these are (highest priority first) ... : 1. the uri 2. the session (maybe, i'm thinking about this ... the argument is that the user shouldn't have to manually

Re: [Catalyst] Multilanguage application

2006-08-25 Thread Daniel McBrearty
that's what I'm thinking AP. cheers. lang Chained('/) looks in the uri. If it succeeds, it sets stash/session too. If it fails it redirects to /default which checks session and redirects, or browser then set session and redirect. If all else fails show a chooser page. On 8/25/06, A. Pagaltzis

[Catalyst] Multilanguage application

2006-08-10 Thread Renaud Drousies
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

Re: [Catalyst] Multilanguage application

2006-08-10 Thread Brian Cassidy
Hi Renaud, 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

Re: [Catalyst] Multilanguage application

2006-08-10 Thread Renaud Drousies
On Thu, August 10, 2006 4:39 pm, Matt S Trout said: 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