NAME
Catalyst::Plugin::Activator::Dictionary : Provide a Catalyst context Activator::Dictionary lookup()
function, and template lookup magic.
SYNOPSIS
# in MyApp.pm
use Catalyst qw/ Activator::Plugin /;
# Later, in some Controller
$c->lookup('dict_key');
DESCRIPTION
This Catalyst plugin provides the two features listed in the METHODS section.
METHODS
lookup
Provides a wrapper to Activator::Dictionary lookup function usable wherever you have access to the catalyst context object $c
.
# lookup in C<web> realm
$c->lookup('dict_key');
# lookup in alternate realm
$c->lookup('dict_key', 'other_realm');
finalize
Does a regular expression replacement of %{}
formatted keys into dictionary lookups from the web
realm.
Example:
In /path/to/dictionary/en/web.dict
:
nice_para This is a nice paragraph.
In a template:
<p>%{nice_para}</p>
Resulting HTML:
<p>This is a nice paragraph.</p>
SEE ALSO
Activator::Dictionary, Catalyst, Catalyst::Manual::Plugins
AUTHOR
Karim Nassar
COPYRIGHT
Copyright (c) 2007 Karim Nassar <karim.nassar@acm.org>
You may distribute under the terms of either the GNU General Public License, or the Artistic License as specified in the Perl README file.