NAME

Catalyst::Plugin::MakeText - Internationalization Plugin for Catalyst

SYNOPSIS

use Catalyst qw/MakeText/

sub hoge {
    my ($self, $c) = @_;
    $c->languages( ['en'] );
    $c->stash->{'body_title'} = $c->localize( 'Register' );
}

DESCRIPTION

It works Locale::Maketext::Simple wrapper.

At least, please prepare MyApp/I18N/some.po or MyApp/I18N/some.mo.

By the way, because the language resource file is loaded at the Catalyst is started, it is necessary to restart the server to reflect the change in the resource.

MyApp/I18N/en.po example

# Comment
msgid "Register"
msgstr "Register"

msgid "Next"
msgstr "Next"

making MyApp/I18N/en.mo

msgfmt en.po -o en.mo

METHODS

languages($c, $locale_array_ref)

set language locale.

loc($c, $message)

localize($c, $message)

get localized text.

SEE ALSO

Locale::Maketext::Simple

AUTHOR

Jun Shimizu, <bayside@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Jun Shimizu.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.