Hi beech,

I don't know if i'd insert the "BEGIN { $ENV{MOJO_I18N_DEBUG} = 1 };" on right file/line. Sorry, i'm just mojolicious rookie yet.

Anyway, my App.pl becomes:

#!/usr/bin/perl use Mojolicious::Lite; BEGIN { $ENV{MOJO_I18N_DEBUG} = 1 }; 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 the response was:

Server available at http://127.0.0.1:3000
Load default namespace App::I18N::pt_br at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 200.
Create default namespace App::I18N::pt_br at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 206.
Load the I18N class App::I18N::pt_br::en at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 216.
Create the I18N class App::I18N::pt_br::en at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 224.
Load the I18N class App::I18N::pt_br::pt_br at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 216.
Load the I18N class App::I18N::pt_br::pt at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 216.
Load the I18N class App::I18N::pt_br::en_us at /usr/local/share/perl/5.18.2/Mojolicious/Plugin/I18N.pm line 216.
Sat Oct 8 06:55:57 2016 debug GET "/"
Sat Oct 8 06:55:57 2016 debug Rendering template "index.html.ep" from DATA section
Sat Oct 8 06:55:57 2016 debug 200 OK (0.003052s, 327.654/s)

The selected language on my browser is "pt_BR".
And "MOJO_I18N_DEBUG" showed that "App.pl" isn't calling my pt_br.pm on I18N folder

What's the next step?

Thanks for your help


In reply to Re^2: Mojolicious i18n "inflate" by pazt
in thread Mojolicious i18n "inflate" by pazt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.