Data-Localize

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN


    # here, we're deliberately not setting any localizers
    my $loc = Data::Localize->new(auto => 1);

    # previous auto => 1 will force Data::Localize to fallback to
    # using the key ('Hello, [_1]') as the localization token.
    print $loc->localize('Hello, [_1]', 'John Doe'), "\n";

# UTF8

All data is expected to be in decoded utf8. You must "use utf8" or 
decode them to Perl's internal representation for all values
passed to Data::Localizer. We won't try to be smart for you. USE UTF8!

- Using Explicit decode()

        use Encode q(decode decode_utf8);
        use Data::Localizer;

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

lib/Data/Localize.pm  view on Meta::CPAN


    # here, we're deliberately not setting any localizers
    my $loc = Data::Localize->new(auto => 1);

    # previous auto => 1 will force Data::Localize to fallback to
    # using the key ('Hello, [_1]') as the localization token.
    print $loc->localize('Hello, [_1]', 'John Doe'), "\n";

=head1 UTF8

All data is expected to be in decoded utf8. You must "use utf8" or 
decode them to Perl's internal representation for all values
passed to Data::Localizer. We won't try to be smart for you. USE UTF8!

=over 4

=item Using Explicit decode()

    use Encode q(decode decode_utf8);
    use Data::Localizer;



( run in 0.233 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )