Mojolicious::Plugin::Wolowitz - Mojo I18n with Locale::Wolowitz
version 1.0.1
# Enable this plugin in the startup method. sub startup { my $self = shift; $self->plugin('wolowitz'); ... }
Locale::Wolowitz is a i18n tool that use JSON as its lexicon storage. This Mojolicious plugin is an alternative choice to do i18n in Mojolicious. You'll need to make a directory named i18n under you app home, and then put translation files into there. See Locale::Wolowitz for the content format of JSON files.
i18n
Return the localized $message. The target language is retrieved from app stash.
$message
For example:
# In controller $self->stash("zh-TW"); # In view <%= loc("Nihao") %>
Kang-min Liu <gugod@gugod.org>
This software is Copyright (c) 2011 by Kang-min Liu.
This is free software, licensed under:
The MIT (X11) License
To install Mojolicious::Plugin::Wolowitz, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Wolowitz
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Wolowitz
For more information on module installation, please visit the detailed CPAN module installation guide.