.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' '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 >0, 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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "LOCALE::PO4A::COMMON.3PM 1" .TH LOCALE::PO4A::COMMON.3PM 1 2025-11-22 "perl v5.42.0" "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::Po4a::Common \- common parts of the po4a scripts and utils .SH DESCRIPTION .IX Header "DESCRIPTION" Locale::Po4a::Common contains common parts of the po4a scripts and some useful functions used along the other modules. .PP If needed, you can disable the use of Text::WrapI18N as such: .PP .Vb 2 \& use Locale::Po4a::Common qw(nowrapi18n); \& use Locale::Po4a::Text; .Ve .PP instead of: .PP .Vb 1 \& use Locale::Po4a::Text; .Ve .PP The ordering is important here: as most Locale::Po4a modules load themselves Locale::Po4a::Common, the first time this module is loaded determines whether Text::WrapI18N is used. .SH FUNCTIONS .IX Header "FUNCTIONS" .SS "Showing output messages" .IX Subsection "Showing output messages" .IP \(bu 4 show_version($) .Sp Shows the current version of the script, and a short copyright message. It takes the name of the script as an argument. .IP \(bu 4 wrap_msg($@) .Sp This function displays a message the same way as \fBsprintf()\fR does, but wraps the result so that they look nice on the terminal. .IP \(bu 4 wrap_mod($$@) .Sp This function works like \fBwrap_msg()\fR, but it takes a module name as the first argument, and leaves a space at the left of the message. .IP \(bu 4 wrap_ref_mod($$$@) .Sp This function works like \fBwrap_msg()\fR, but it takes a file:line reference as the first argument, a module name as the second one, and leaves a space at the left of the message. .SS "Wrappers for other modules" .IX Subsection "Wrappers for other modules" .IP \(bu 4 Locale::Gettext .Sp When the Locale::Gettext module cannot be loaded, this module provide dummy (empty) implementation of the following functions. In that case, po4a messages won\*(Aqt get translated but the program will continue to work. .Sp If Locale::gettext is present, this wrapper also calls setlocale(LC_MESSAGES, "") so callers don\*(Aqt depend on the POSIX module either. .RS 4 .IP \(bu 4 bindtextdomain($$) .IP \(bu 4 textdomain($) .IP \(bu 4 gettext($) .IP \(bu 4 dgettext($$) .RE .RS 4 .RE .SH AUTHORS .IX Header "AUTHORS" .Vb 1 \& Jordi Vilalta .Ve .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright © 2005 SPI, Inc. .PP This program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file).