[Catalyst] Multilanguage application

Rodney Broom rbroom+catalyst at rbroom.com
Thu Aug 10 16:29:29 CEST 2006

From: "Renaud Drousies" <renaud at linuxaddicts.com>

> 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).

Good thinking, I tend to agree. Then you could take hints from headers/cookies if available.

> That works quite nice, the only problem is that I must take care of having
> ALL my links in the template starting with href="[% root %]/foo/bar".

Maybe a simple macro or sub in the stash:
  href="[% link('/foo/bar') %]

This still requires you to add TT to all of your links, but maybe it's more managable from a usage standpoint.

Perhaps if TT support some kind of a source filter (pre or post). Though, I'll bet that would require being pretty careful in your implementation to get the regexes right.

I'll be interested to hear what comes out of this. Good contextual support (language in this case) is something I'm starting to wonder about.

Rodney Broom

More information about the Catalyst mailing list