1LOCALE::PO4A::COMMON.3PUMs(e1r)Contributed Perl DocumentLaOtCiAoLnE::PO4A::COMMON.3PM(1)
2
3
4
6 Locale::Po4a::Common - common parts of the po4a scripts and utils
7
9 Locale::Po4a::Common contains common parts of the po4a scripts and some
10 useful functions used along the other modules.
11
12 If needed, you can disable the use of Text::WrapI18N as such:
13
14 use Locale::Po4a::Common qw(nowrapi18n);
15 use Locale::Po4a::Text;
16
17 instead of:
18
19 use Locale::Po4a::Text;
20
21 The ordering is important here: as most Locale::Po4a modules load
22 themselves Locale::Po4a::Common, the first time this module is loaded
23 determines whether Text::WrapI18N is used.
24
26 Showing output messages
27 • show_version($)
28
29 Shows the current version of the script, and a short copyright
30 message. It takes the name of the script as an argument.
31
32 • wrap_msg($@)
33
34 This function displays a message the same way as sprintf() does,
35 but wraps the result so that they look nice on the terminal.
36
37 • wrap_mod($$@)
38
39 This function works like wrap_msg(), but it takes a module name as
40 the first argument, and leaves a space at the left of the message.
41
42 • wrap_ref_mod($$$@)
43
44 This function works like wrap_msg(), but it takes a file:line
45 reference as the first argument, a module name as the second one,
46 and leaves a space at the left of the message.
47
48 Wrappers for other modules
49 • Locale::Gettext
50
51 When the Locale::Gettext module cannot be loaded, this module
52 provide dummy (empty) implementation of the following functions. In
53 that case, po4a messages won't get translated but the program will
54 continue to work.
55
56 If Locale::gettext is present, this wrapper also calls
57 setlocale(LC_MESSAGES, "") so callers don't depend on the POSIX
58 module either.
59
60 • bindtextdomain($$)
61
62 • textdomain($)
63
64 • gettext($)
65
66 • dgettext($$)
67
69 Jordi Vilalta <jvprat@gmail.com>
70
72 Copyright © 2005 SPI, Inc.
73
74 This program is free software; you may redistribute it and/or modify it
75 under the terms of GPL (see the COPYING file).
76
77
78
79perl v5.38.0 2023-10-12 LOCALE::PO4A::COMMON.3PM(1)