- SEE ALSO
- COPYRIGHT AND LICENSE
Locale::TextDomain::UTF8::IfEnv - Enable translation + UTF-8 encoding only when environment variable flag is true
This document describes version 0.001 of Locale::TextDomain::UTF8::IfEnv (from Perl distribution Locale-TextDomain-UTF8-IfEnv), released on 2019-12-26.
use Locale::TextDomain::UTF8::IfEnv 'Some-TextDomain'; print __ "Hello, world!\n";
When imported, Locale::TextDomain::UTF8::IfEnv will check the
PERL_LOCALE_TEXTDOMAIN_IFENV environment variable. If the environment variable has a true value, the module will load Locale::TextDomain::UTF8 and pass the import arguments to it. If the environment variable is false, the module will install a mock version of
__, et al. Thus, all strings will translate to themselves.
This module can be used to avoid the startup (and runtime) cost of translation unless when you want to enable translation.
For simplicity, currently the tied hash (
%__) and its hashref (
$__) are not provided. Contact me if you use and need this.
Please visit the project's homepage at https://metacpan.org/release/Locale-TextDomain-UTF8-IfEnv.
Source repository is at https://github.com/perlancar/perl-Locale-TextDomain-UTF8-IfEnv.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Locale-TextDomain-UTF8-IfEnv
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2019 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.