View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Afnic and IIS Zonemaster Project > Zonemaster-Engine-v2.0.6 > Zonemaster::Engine::Translator

Download:
Zonemaster-Engine-v2.0.6.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: v1.0.7   Source  

NAME ^

Zonemaster::Engine::Translator - translation support for Zonemaster

SYNOPSIS ^

    my $trans = Zonemaster::Engine::Translator->new({ locale => 'sv_SE.UTF-8' });
    say $trans->to_string($entry);

ATTRIBUTES ^

locale

The locale that should be used to find translation data. If not explicitly provided, defaults to (in order) the contents of the environment variable LANG, LC_ALL, LC_MESSAGES or, if none of them are set, to en_US.UTF-8.

data

A reference to a hash with translation data. This is unlikely to be useful to end-users.

METHODS ^

to_string($entry)

Takes a Zonemaster::Engine::Logger::Entry object as its argument and returns a translated string with the timestamp, level, message and arguments in the entry.

translate_tag

Takes a Zonemaster::Engine::Logger::Entry object as its argument and returns a translation of its tag and arguments.

BUILD

Internal method that's only mentioned here to placate Pod::Coverage.

syntax highlighting: