NAME
CatalystX::I18N::Model::L10N - Glues CatalystX::I18N::L10N into Catalyst
SYNOPSIS
package MyApp::Catalyst;
use Catalyst qw/CatalystX::I18N::Role::Base/;
__PACKAGE__->config(
'Model::L10N' => {
directory => '/path/to/l10n/files', # optional
},
);
package MyApp::Model::L10N;
use parent qw/CatalystX::I18N::Model::L10N/;
package MyApp::Controller::Main;
use parent qw/Catalyst::Controller/;
sub action : Local {
my ($self,$c) = @_;
$c->stash->{title} = $c->model('L10N')->maketext('Hello world');
# See CatalystX::I18N::Role::Maketext for a convinient wrapper
}
DESCRIPTION
This model glues a CatalystX::I18N::L10N class (or any other Locale::Maketext class) with Catalyst.
CONFIGURATION
class
Set the Locale::Maketext class you want to use from this model.
Defaults to $APPNAME::L10N
gettext_style
Enable gettext style. %quant(%1,document,documents) instead of [quant,_1,document,documents]
Default TRUE
directory
List of directories to be searched for L10N files.
See CatalystX::I18N::L10N for more details on the directory
parameter
SEE ALSO
CatalystX::I18N::L10N, Locale::Maketext, Locale::Maketext::Lexicon and CatalystX::I18N::Role::Maketext
AUTHOR
Maroš Kollár
CPAN ID: MAROS
maros [at] k-1.com
L<http://www.revdev.at>