[Catalyst] Data::Localize::Railsy for rails-like i18n in Catalyst
Ævar Arnfjörð Bjarmason
avarab at gmail.com
Mon Jan 4 00:44:56 GMT 2010
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,
here's how it looks like in practice:
Template: http://github.com/avar/App-OpenStreetMapIs-Web/blob/master/root/_sidebar.tt
The translation file:
http://github.com/avar/App-OpenStreetMapIs-Web/blob/master/lib/App/OpenStreetMapIs/I18N/is.yml
And here are further POD docs on how to use it (this'll be easier to
read on search.cpan.org once it's indexed):
http://github.com/avar/data-localize-railsy/blob/master/lib/Data/Localize/Railsy.pm
Anyway I hope it's useful for someone. Now I just have to find out how
to make some drop-down menu that sets a language cookie when you
change it so that I can use this stuff myself :)
More information about the Catalyst
mailing list