[Catalyst] i18n plugin not working for me

Zbigniew Lukasiak zzbbyy at gmail.com
Mon Oct 31 22:20:02 CET 2005


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
>
>  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
>
>
>


More information about the Catalyst mailing list