Hi Stefan,
Thank you for answer. According
source code MyApp::I18N must be defined when I register the plugin:
$self->plugin('I18N');
I (and
not only me) think that the plugin doesn't work in current Mojolicious version - tested it at 6.55 and 6.66. I'm trying to understand the reason and it will be great if you will help me.
For example, when I have
at my template and localization module looks like
require Exporter;
our @ISA = qw(Exporter);
our %Lexicon = (
about_service => 'About app',
);
1;
at rendered template I still see
'about_service' text instead of
'About app'
I also tried to specify the url, e.g. /en. At log I see debug message
[Tue Jun 21 11:02:41 2016] [debug]
Found language en in URL /en[Tue Jun 21 11:02:41 2016] [debug] GET "/"
[Tue Jun 21 11:02:41 2016] [debug] Routing to a callback
[Tue Jun 21 11:02:41 2016] [debug] Rendering cached template "index.html.ep"
[Tue Jun 21 11:02:41 2016] [debug] Rendering cached template "layouts/default.html.ep"
[Tue Jun 21 11:02:41 2016] [debug] 200 OK (0.007188s, 139.121/s)
But localize subroutine still doesn't work.
What could be the problem?
понедельник, 20 июня 2016 г., 21:43:25 UTC+3 пользователь Stefan Adams написал: