Locale::MakePhrase::Print - Overload of
Using this module, it will override
Your application will have previously instantiated a Locale::MakePhrase object in some other module. Now you need to use that instantiation within a particular module; from here:
use Locale::MakePhrase::Print; ... print "Some text to be translated.";
The purpose of this module, is to de-couple the use of the translation engine, from the API of the translation engine. This saves you from littering your application code with translation-specific function calls. The main benefits are:
makes the code easier to read
allows you to easily change to a different translation engine
decouples translation from application design
To use this module, you simply need to
use it at the top of your own module. You can optionally specify a specific filehandle to print to (rather than STDOUT), eg:
use Locale::MakePhrase::Print; ... print "Some text";
open(FH,">some_output_file.txt") or die; use Locale::MakePhrase::Print \*FH; ... print "Some text";
Will print Some text to STDOUT or the specified filehandle.
To stop overriding
println "..." [, ...]
This function is explicatly exported so that users can avoid having to specify the newline character in the translation key.
no Locale::MakePhrase::Print is in effect,
println simply prints out the un-translated string, including a the newline.
This module overrides
println function. ie: specifying a filehandle to
Thus to specifically avoid using the overridden
print STDOUT "Some un-translated text.";