Locale::Maketext::Extract::DBI

LTjake on 2006-01-20T19:38:23

I18N is, in general, hard.

Luckily for Catalyst users, I18N integration gets a little easier with Catalyst::Plugin::I18N. It lets you integrate some standard I18N practices into your web app (by way of Locale::Maketext::Lexicon).

One of the neat tools you get is a little script called xgettext. You can feed it a list of files to troll and it will pull back your text to be translated and save it to a .po file. You can then use standard tools, like poEdit to manage your translations.

This is fine and dandy if everything you need translated is stored in your source or templates. However, like most sufficiently complex applications, there is a percentage of those keys that will be stored in a database.

My solution was to come up with an xgettext-like tool to simplify .po creation from a database table. The results can be found on CPAN under Locale::Maketext::Extract::DBI (eventually, indexing pending).

Comments welcome!