#!/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'
####
App
|+- App.pl
|- I18N
| |- fr.pm
| +- pt_br.pm
####
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'
####
package App::I18N::pt_br;
use Mojo::Base 'Locale::Maketext';
use utf8;
our %Lexicon = ('hello world'=> 'Olá Mundo');