NAME

Locale::Utils::Autotranslator::Interactive - Interface for manual translation with copy/paste

VERSION

1.011

SYNOPSIS

use Locale::Utils::Autotranslator::Interactive;

my $obj = Locale::Utils::Autotranslator::Interactive->new(
    language                => 'de',
    # all following parameters are optional
    developer_language      => 'en', # en is the default
    before_translation_code => sub {
        my ( $self, $msgid ) = @_;
        ...
        return 1; # true: translate, false: skip translation
    },
    after_translation_code  => sub {
        my ( $self, $msgid, $msgstr ) = @_;
        ...
        return 1; # true: translate, false: skip translation
    },
);
$identical_obj = $obj->translate(
    'mydir/de.pot',
    'mydir/de.po',
);
my $translation_count = $obj->translation_count;

DESCRIPTION

Interface for translation by terminal input

Type __END__ to stop the translation. Otherwise the file is stored back after all translations for that file are done.

SUBROUTINES/METHODS

method new

see SYNOPSIS

method translate_text

$translated = $object->translate_text($untranslated);

EXAMPLE

Inside of this distribution is a directory named example. Run the *.pl files.

DIAGNOSTICS

none

CONFIGURATION AND ENVIRONMENT

none

DEPENDENCIES

Encode

Moo

namespace::autoclean

Locale::Utils::Autotranslator

INCOMPATIBILITIES

not known

BUGS AND LIMITATIONS

not known

SEE ALSO

http://en.wikipedia.org/wiki/Gettext

Locale::TextDomain::OO

AUTHOR

Steffen Winkler

LICENSE AND COPYRIGHT

Copyright (c) 2021, Steffen Winkler <steffenw at cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.