Let's say I have myscript.tar.gz
package generated by h2xs -AX myscript
containing bin/myScript.pl
and lib/MyPackage/MyModule.pm
. Makefile.PL
and MANIFEST
manualy edited so I'm able to install the package and run myScript.pl
.
myscript.pl:
#!/usr/bin/perl
use strict;
use warnings;
use MyPackage::MyModule;
my $generator = MyPackage::MyModule->new();
my $value = $generator->getValue();
#And the message to be translated/localized
print "Obtained value was $value";
How do I localize my package?
I read this: How can I add internationalization to my Perl script? and alike, but it's sort of outdated. I also tried example from libintrl-perl, but I'm not wise from it and couldn't make it work.