Daisuke Maki > Data-Localize > Data::Localize::Format::Gettext

Download:
Data-Localize-0.00026.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Data::Localize::Format::Gettext - Gettext Formatter

SYNOPSIS ^

    # Used by Data::Localize::Gettext by default, but if you want to
    # customize ( maybe include function calls "%myfunc(...)" ), then
    # do this:

    $loc = Data::Localize->new();
    $loc->add_localizer(
        Data::Localize::Gettext->new(
            formatter => Data::Localize::Format::Gettext->new(
                functions => {
                    foo => sub {
                        my ($lang, $args) = @_;
                        # $lang isa 'Str',
                        # $args isa 'ArrayRef'
                        return "localized text";
                    },
                    bar => sub { ... },
                    baz => sub { ... },
                }
            )
        )
    );

METHODS ^

format

syntax highlighting: