[Catalyst] I18N with variables

Julien Sobrier julien at sobrier.net
Mon Aug 2 05:08:04 GMT 2010

I've started to translate my website using Catalyst::Plugin::I18N. It
works fine for static text. Bu I can't make it work for variables. For
example, I need to a translation for [% foo %] where for can take a
set of values defined in a database.

I'm sot sure what is the best way to translate such variables, and
what is possible:
* add a msgid for each possible value in messages.po => those gets
removed every time I run xgettext.pl
* Make the translation in my Database layer => unfortunately I use the
old Class::DBI, and could not find a plugin for it
* any other option?

Also, writing [% c.loc(foo) %] does not create an entry in messages.po
when running xgettext.pl, like [% c.loc('foo') %] does.


More information about the Catalyst mailing list