[Catalyst] setting/getting session data from within tests

Zbigniew Lukasiak zzbbyy at gmail.com
Tue Jun 6 09:07:02 CEST 2006


Hi,

I concur the point on keeping the language in the url.  This way the
choice is visible, the user can change it and also it is possible to
link between languages.

There was a  disussion long ago how to implement it.  Eventually I
settled on just having entries in the httpd.conf for each language -
so that the application is started for the right urls and it than just
check the urls and sets the language from them.

I am waiting for a better way of doing it.

--
Zbyszek

On 6/5/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> I can see your point, I think - need to think about this. Thank you.
>
> what happens to the catalyst routing though when you have uri :
>
> http://www.example.net/fr/some_controller/some_action
>
> instead of :
>
> http://www.example.net/some_controller/some_action
>
> An auto acton in the route to get the language out of the uri? and all
> actions have to match on a regex?
> or is there a simpler way?
>
>
> On 6/5/06, A. Pagaltzis <pagaltzis at gmx.de> wrote:
> > * Daniel McBrearty <danielmcbrearty at gmail.com> [2006-06-05 21:10]:
> > > what's the advantage of using the uri?
> >
> > F.ex., the page content can be cached; if it changes based on
> > state in a cookie, that's not possible. The server never needs to
> > consult the DB to find which version of a page the user wants:
> > it's right there in the URI the user requested.
> >
> > > and what happens when the user closes the browser and comes
> > > back an hour later? why should they select again?
> >
> > You do let them save a preference on the server. But the only
> > case that this needs to be consulted is for requests to the `/`
> > homepage. All other pages on the server live in namespaces where
> > the URI states the language and regular URI dispatch returns the
> > proper thing.
> >
> > Since `/` itself is always only a redirect, it's also likely that
> > users will bookmark something like `example.net/en/` or
> > `example.net/br/`, so their "configuration" is right there in
> > their bookmark. Obviously they don't need to choose again.
> >
> > The less state is stored implicitly in the server, and the more
> > of it is made explicit in the URI, the easier the entire thing is
> > to test, cache, distribute, etc.
> >
> > Regards,
> > --
> > Aristotle Pagaltzis // <http://plasmasturm.org/>
> >
> > _______________________________________________
> > Catalyst mailing list
> > Catalyst at lists.rawmode.org
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> >
>
>
> --
> Daniel McBrearty
> email : danielmcbrearty at gmail.com
> www.engoi.com : the multi - language vocab trainer
> BTW : 0873928131
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/



More information about the Catalyst mailing list