The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mojolicious::Plugin::Wolowitz - Mojo I18n with Locale::Wolowitz

VERSION

version 1.0.1

SYNOPSIS

    # Enable this plugin in the startup method.
    sub startup {
        my $self = shift;
        $self->plugin('wolowitz');
        ...
    }

DESCRIPTION

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.

METHODS

loc($message, @args)

Return the localized $message. The target language is retrieved from app stash.

For example:

    # In controller
    $self->stash("zh-TW");

    # In view
    <%= loc("Nihao") %>

AUTHOR

Kang-min Liu <gugod@gugod.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Kang-min Liu.

This is free software, licensed under:

  The MIT (X11) License