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

Jozef Kutej jozef at kutej.net
Tue Mar 10 13:15:06 GMT 2009


Larry Leszczynski wrote:
>     [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



More information about the Catalyst mailing list