[Catalyst] What are the best practices for using phrasebooks in Catalyst applications?

Robert Rothenberg robrwo at gmail.com
Fri Jan 27 13:19:47 GMT 2012

I am working on a project where the terminology we are using for "objects"
in the system is diverging from terminology that the client is using for
those things.  And it also seems that other clients may use different names
for these objects. (And this is just for English-language interfaces.)

So I would like to use some kind of phrasebook, so that the source code can
use the same, consistent terminology, but the clients see their terminology
in the UI.

I'd prefer not to maintain a separate set of templates for each client,
since that requires keeping changes to templates consistent across sets, and
requires keeping changes to terminology consistent in a set.

So... is there an existing plugin that is used for such things?

Otherwise, I am thinking of writing a plugin that makes use of
Data::Phrasebook (or something similar), allows for configuration of the
phrasebook in the configuration file, and adds a new method to the Catalyst
context variable for querying the phrasebook, e.g. the template may have
something like

  <h1>[% c.phrase('widgets') | html %]</h1>

Does this make sense, or is there a better way to do this?


More information about the Catalyst mailing list