Hi monks
I'm trying "inflate" languages parts from my App.pl script but i'm not getting works
This is my working App.pl
#!/usr/bin/perl # Brazilian portuguese package App::I18N::pt_br; use Mojo::Base 'Locale::Maketext'; use utf8; our %Lexicon = ('hello world'=> 'Olá Mundo'); # French package App::I18N::fr; use Mojo::Base 'Locale::Maketext'; use utf8; our %Lexicon = ('hello world'=> 'salut monde'); package main; use Mojolicious::Lite; plugin I18N => { namespace => 'App::I18N', support_url_langs => [qw(en fr pt_br)] }; get '/' => 'index'; app->start; __DATA__ @@ index.html.ep %= l 'hello world'
Using that script above everything works. But when i try to separate the language parts, the script not fail, but not translate the 'hello world' word.
I tried split the script like this:
App |+- App.pl |- I18N | |- fr.pm | +- pt_br.pm
App.pl becames:
use Mojolicious::Lite; plugin I18N => { namespace => 'App::I18N', support_url_langs => [qw(en fr pt_br)] }; get '/' => 'index'; app->start; __DATA__ @@ index.html.ep %= l 'hello world'
and package App::I18N::pt_br becames pt_br.pm:
package App::I18N::pt_br; use Mojo::Base 'Locale::Maketext'; use utf8; our %Lexicon = ('hello world'=> 'Olá Mundo');
So.... Am I doing something wrong? How can I split my language parts from my script and keep it working?
Thank you very much
In reply to Mojolicious i18n "inflate" by pazt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |