[Catalyst] Data::Localize::Railsy for rails-like i18n in Catalyst

Ævar Arnfjörð Bjarmason avarab at gmail.com
Mon Jan 4 02:07:16 GMT 2010


On Mon, Jan 4, 2010 at 01:02, Matthias Dietrich <mdietrich at cpan.org> wrote:
> Am 04.01.2010 um 01:44 schrieb Ævar Arnfjörð Bjarmason <avarab at gmail.com>:
>
>> I just uploaded Data::Localize::Railsy to CPAN for use in the Catalyst
>> app I was building:
>>
>>   http://search.cpan.org/dist/Data-Localize-Railsy/ (not yet indexed
>> as of writing)
>>
>> I wrote it because I didn't like the existing Gettext frameworks for
>> internationalization and prefer something where you don't specify the
>> human readable source text in your code/templates but an abstract key,
>
> Did you take a look at Locale::Maketext::Lexicon::DBI with its Catalyst
> plugin C::P::I18N::DBI?  There you are suggested to have an abstract key
> that belongs to one sentence in each language.  It supports every
> gettext/maketext "interpolation" and so on.

Yeah and I didn't want to run DBI :) Actually you could also do this
with the Gettext plugin:

  msgid "an.abstract.id"
  msgstr "Hello there [_1]"

  $c->loc("an.abstract.id", "your name here");

So you can coerce most backends to accept the sort of stuff I did. I
just wanted something with a simple tree-structure hash. I also have a
backend for it already at Translatewiki (http://translatewiki.net/)
which is a plus.



More information about the Catalyst mailing list