CHips L MINI SHELL

CHips L pro

Current Path : /proc/2/root/usr/local/share/man/man3/
Upload File :
Current File : //proc/2/root/usr/local/share/man/man3/Locale::MakePhrase::Print.3pm

.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "Locale::MakePhrase::Print 3"
.TH Locale::MakePhrase::Print 3 "2006-03-21" "perl v5.10.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Locale::MakePhrase::Print \- Overload of \f(CW\*(C`print\*(C'\fR to automate translations
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
Using this module, it will override \f(CW\*(C`print\*(C'\fR statements so that your
application automatically gets translated into the target language.
.PP
Example:
.PP
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:
.PP
.Vb 3
\&  use Locale::MakePhrase::Print;
\&  ...
\&  print "Some text to be translated.";
.Ve
.PP
When \f(CW\*(C`print\*(C'\fR is called, the text is automatically fed into the
translation engine.
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The purpose of this module, is to de-couple the use of the translation
engine, from the \s-1API\s0 of the translation engine.  This saves you from
littering your application code with translation-specific function
calls.  The main benefits are:
.IP "\(bu" 2
makes the code easier to read
.IP "\(bu" 2
allows you to easily change to a different translation engine
.IP "\(bu" 2
decouples translation from application design
.SH "API"
.IX Header "API"
To use this module, you simply need to \f(CW\*(C`use\*(C'\fR it at the top of your
own module.  You can optionally specify a specific filehandle to print
to (rather than \s-1STDOUT\s0), eg:
.PP
.Vb 3
\&  use Locale::MakePhrase::Print;
\&  ...
\&  print "Some text";
.Ve
.PP
or
.PP
.Vb 4
\&  open(FH,">some_output_file.txt") or die;
\&  use Locale::MakePhrase::Print \e*FH;
\&  ...
\&  print "Some text";
.Ve
.PP
Will print \fBSome text\fR to \s-1STDOUT\s0 or the specified filehandle.
.PP
To stop overriding \f(CW\*(C`print\*(C'\fR:
.PP
.Vb 1
\&  no Locale::MakePhrase::Print;
.Ve
.ie n .SS "println ""..."" [, ...]"
.el .SS "println ``...'' [, ...]"
.IX Subsection "println ... [, ...]"
This function is explicatly exported so that users can avoid having
to specify the newline character in the translation key.
.PP
Note: when \f(CW\*(C`no Locale::MakePhrase::Print\*(C'\fR is in effect, \f(CW\*(C`println\*(C'\fR
simply prints out the un-translated string, including a the newline.
.SH "NOTES"
.IX Header "NOTES"
This module overrides \f(CW\*(C`print\*(C'\fR only for the \s-1STDOUT\s0 filehandle; this
also applies to exported the \f(CW\*(C`println\*(C'\fR function. ie: specifying a
filehandle to \f(CW\*(C`print\*(C'\fR will result in no translation occurring,
or some weired error if used with \f(CW\*(C`println\*(C'\fR.
.PP
Thus to specifically avoid using the overridden \f(CW\*(C`print\*(C'\fR function,
explicatly specify the filehandle as in:
.PP
.Vb 1
\&  print STDOUT "Some un\-translated text.";
.Ve

Copyright 2K16 - 2K18 Indonesian Hacker Rulez