[Catalyst] i18n plugin not working for me

Alejandro Imass alejandro.imass at gmail.com
Tue Nov 1 02:14:17 CET 2005


I forgot to report that I solved the problem. I had the I18N directory in
the root instead of the lib directory, that was the problem. Anyhow, thanks
a lot for the post, and like yourself I decided to go with maketext only as
I don't need compatibility with other languages for my strings.



On 10/31/05, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
>
> I believe that plugin does not do much. In my apps I use following code:
>
> my $lh = LinkDB::L10N->get_handle(@langs) || die "What language?: $!";
> $c->stash->{l} = sub {$lh->maketext(@_)};
>
> And than use the l sub in my TT templates.
>
> -- Zbyszek
>
> On 10/28/05, Alejandro Imass <alejandro.imass at gmail.com> wrote:
> > Hi,
> >
> > I am quite new to Catalyst and new to i18n so please bear w me, searched
> > the list archives and found only one post to i18n that I did not
> understand.
> >
> > I tried a small example w/ a brand new catalyt app called 'Nueva'. Here
> is
> > the relevant method in Nueva.pm <http://Nueva.pm>
> >
> > sub prueba : Global {
> >
> > my ($self, $c) = @_;
> > $c->languages( ['es'] );
> >
> > # I wonder if the plugin supports this!
> > #my $place = ~~'world';
> >
> > my $place = $c->localize('world');
> >
> > $c->res->output("Called Global $place instead!");
> >
> > }
> >
> > I created the directory Prueba/I18N as the pod says and created one po
> file
> > called 'es' in that directory with this content:
> >
> > # es.po
> > msgid "world"
> > msgstr "mundo"
> >
> > The example did not work. I have two questions:
> >
> > 1) Why?
> > 2) Is the =~~ supported in the Catalyst plugin?
> >
> > Thanks in advance,
> > Alejandro
> >
> >
> >
> >
> >
> > _______________________________________________
> > Catalyst mailing list
> > Catalyst at lists.rawmode.org
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> >
> >
> >
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051031/b4b1b342/attachment-0001.htm


More information about the Catalyst mailing list