package JWebmail::I18N; use v5.22; use warnings; use utf8; use parent 'Locale::Maketext'; sub init { my $self = shift; $self->SUPER::init(@_); $self->fail_with('log_on_failure'); } sub fallback_languages { qw() } sub log_on_failure { my $self = shift; my $prase = shift; $self->logger->("missing translation for @{[$self->language_tag]}:'$prase'"); $self->failure_handler_auto($prase, @_); } sub logger { my $self = shift; if (@_) { $self->{_jwm_logger} = $_[0]; return $self; } else { return $self->{_jwm_logger}; } } 1 __END__ =encoding utf-8 =head1 NAME JWebmail::L10N - Base class for internationalization