[Catalyst] Multilanguage application

Daniel McBrearty danielmcbrearty at gmail.com
Fri Aug 25 12:50:53 CEST 2006


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 <pagaltzis at gmx.de> wrote:
> * Daniel McBrearty <danielmcbrearty at gmail.com> [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 set the language
> > twice while a cookie persists).
> > 3. the browser settings.
>
> Using the session and browser settings are fine; but best is if
> you implement them using redirection.
>
> Ie. when someone visits the site, and their session says they
> want French, you redirect them to `/fr/$whatever`.
>
> Ideally, only the front page of the site has a language-less URI,
> and only there do you redirect. Then whatever other URI they
> might bookmark will always have a language code, so on subsequent
> pages the problem doesn't come up at all.
>
> Regards,
> --
> Aristotle Pagaltzis // <http://plasmasturm.org/>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>


-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list