[Catalyst] Problem using Catalyst::Plugin::I18N and Catalyst::Plugin::PageCache

Larry Leszczynski larryl at emailplus.org
Tue Mar 10 14:24:50 GMT 2009


Hi Jozef -

> >     [debug] $c->languages from auto-detect: ["en-us", "en", "i-default"]
> >        (this looks right based on my browser settings)
> > 
> >     [debug] $c->language: i_default
> >        (why does it pick "i-default" instead of "en-us" or "en"?)
> > 
> >     [debug] Setting language to "en"...
> >     [debug] $c->languages: ["en"]
> >        (this looks right)
> > 
> >     [debug] $c->language: i_default
> >        (I expected "en" here)
> 
> $c->languages returns (by default) your browser preferences +
> "i-default". the
> $c->language loop through those and tries to find localization files by
> calling:
> 
> my $class = ref $c || $c;
> my $lang = ref "$class\::I18N"->get_handle( @{ $c->languages } );
> 
> which should be get_handle of
> http://search.cpan.org/perldoc?Locale::Maketext
> 
> do you have MyApp/I18N/en.po or friends?
> 
> cheers,
> jozef

Thanks for following up - it turned out my problem was related to
mismatched names on my MyApp/I18N/*.pm files and their corrresponding
package names.  I was using e.g. MyApp::I18N::en_GB but
Catalyst::Plugin::I18N was looking for MyApp::I18N::en_gb.

Thanks,
Larry



More information about the Catalyst mailing list