NAME

Data::Localize::MultiLevel - Fetch Data From Multi-Level Data Structures

SYNOPSIS

use Data::Localize;

my $loc = Data::Localize->new();

$loc->add_localizer(
    Data::Localize::MultiLevel->new(
        paths => [ '/path/to/lexicons/*.yml' ]
    )
);

$loc->localize( 'foo.key', { arg => $value, ... } );

# above is internally... 
$loc->localize_for(
    lang => 'en',
    id => 'foo.key',
    args => [ { arg => $value } ]
);
# which in turn looks up...
# $lexicons->{foo}->{key};

DESCRIPTION

Data::Localize::MultiLevel implements a "Rails"-ish I18N facility. Namely it uses a multi-level key to lookup data from a hash, and uses the NamedArgs

METHODS

get_lexicon

set_lexicon

load_from_path