Christopher H. Laco > Mango-0.01000_13 > Mango::Catalyst::Plugin::I18N

Download:
Mango-0.01000_13.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Mango::Catalyst::Plugin::I18N - Custom Catalyst I18N Plugin

SYNOPSIS ^

    use Catalyst qw/
        -Debug
        ConfigLoader
        +Mango::Catalyst::Plugin::I18N
        Static::Simple
    /;
    
    $c->localize('Hello [_1]', 'world');

DESCRIPTION ^

Mango::Catalyst::Plugin::I18N is a custom Catalyst plugin for localizing text messages within a Mango application.

CONFIGURATION ^

The following configuration variables are available:

i18n_class

If specific, this is the name of the class to be used to localize text. The class can be any class that supports the Locale::MAketext interface.

IF no class is specified, $appname::I18N will be loaded. IF that does not exist, $appname::L10N will be loaded.

METHODS ^

lang

Same as "language".

language

Returns the first supported language from the first available localization class.

langs

Same as "languages".

languages

Returns an array reference containing the list of requested languages from %ENV/Accept-Language.

loc

Same as "localize".

localize

Arguments: $text, @args

Localizes the given text using the first available localization class (i18n_class, $appname::I18N, $appname::L10N). If the text appears unchanged, Mango::I18N will be called to localize the text as a last resort.

setup

Called by Catalyst when loading the plugin.

SEE ALSO ^

Mango::I18N

AUTHOR ^

    Christopher H. Laco
    CPAN ID: CLACO
    claco@chrislaco.com
    http://today.icantfocus.com/blog/
syntax highlighting: