[Catalyst] Announce. Catalyst::Plugin::I18N::DBIC 0.01

Brandon Black blblack at gmail.com
Tue Nov 14 23:36:16 GMT 2006


On 11/13/06, Ian Docherty <ian at iandocherty.com> wrote:
> Since I got no response to my request a few weeks ago about I18N data
> from a database I wrote my own :)
>
> This module has just been released to CPAN.
>

I've just been looking at Cat I18N stuff.  This looks promising (I
haven't actually used it yet).  Based on the source, I would make a
few suggestions for the next version:

1) Make the model name "DBIC::Lexicon" configurable instead of
hardcoded, via config->{'I18N::DBIC'}->lexicon_model

2) Why not make the primary key (language, path, message) instead of a
random incrementing serial numer that isn't used?  It would help
reduce accidental redundancy in the database, and give you an index on
the columns most likely to be searched on.

3) Reloading lexicons per-request is going to be wasteful in the most
common cases.  It might be better to offer a couple of other options
(via configuration), such as:
   a) Pre-load the entire Lexicon at app startup
  b) Dynamically load lexicon paths into memory as they are used, but
cache them from then on (don't reload unnecessarily)

-- Brandon



More information about the Catalyst mailing list