1XGETTEXT(1)           User Contributed Perl Documentation          XGETTEXT(1)
2
3
4

NAME

6       xgettext.pl - Extract translatable strings from source
7

VERSION

9       version 1.00
10

SYNOPSIS

12       xgettext.pl [OPTION] [INPUTFILE]...
13

DESCRIPTION

15       This program extracts translatable strings from given input files, or
16       from STDIN if none are given.
17
18       Please see Locale::Maketext::Extract for a list of supported input file
19       formats.
20

OPTIONS

22       Mandatory arguments to long options are mandatory for short options
23       too.  Similarly for optional arguments.
24
25   Input file location:
26       INPUTFILE...
27           Files to extract messages from.  If not specified, STDIN is
28           assumed.
29
30       -f, --files-from=FILE
31           Get list of input files from FILE.
32
33       -D, --directory=DIRECTORY
34           Add DIRECTORY to list for input files search.
35
36   Input file format:
37       -u, --use-gettext-style
38           Specifies that the source programs uses the Gettext style (e.g.
39           %1) instead of the Maketext style (e.g. "[_1]") in its localization
40           calls.
41
42   Output file location:
43       -d, --default-domain=NAME
44           Use NAME.po for output, instead of "messages.po".
45
46       -o, --output=FILE
47           PO file name to be written or incrementally updated; "-" means
48           writing to STDOUT.
49
50       -p, --output-dir=DIR
51           Output files will be placed in directory DIR.
52
53   Output details:
54       -g, --gnu-gettext
55           Enables GNU gettext interoperability by printing "#,
56           perl-maketext-format" before each entry that has "%" variables.
57
58       -W, --wrap
59           If wrap is enabled, then, for entries with multiple file locations,
60           each location is listed on a separate line. The default is to put
61           them all on a single line.
62
63           Other comments are not affected.
64
65   Plugins:
66       By default, all builtin parser plugins are enabled for all file types,
67       with warnings turned off.
68
69       If any plugin is specified on the command line, then warnings are
70       turned on by default - you can turn them off with "-now"
71
72       -P|--plugin pluginname
73               Use the specified plugin for the default file types recognised by that
74               plugin.
75
76       -P|--plugin 'pluginname=*'
77               Use the specified plugin for all file types.
78
79       -P|--plugin pluginname=ext,ext2
80               Use the specified plugin for any files ending in C<.ext> or C<.ext2>
81
82       -P|--plugin My::Module::Name='*'
83               Use your custom plugin module for all file types
84
85       Multiple plugins can be specified on the command line.
86
87       Available plugins:
88
89       "perl"    : Locale::Maketext::Extract::Plugin::Perl
90           For a slightly more accurate but much slower Perl parser, you can
91           use the PPI plugin. This does not have a short name, but must be
92           specified in full, eg:
93
94               xgettext.pl -P Locale::Maketext::Extract::Plugin::PPI
95
96       "tt2"     : Locale::Maketext::Extract::Plugin::TT2
97       "yaml"    : Locale::Maketext::Extract::Plugin::YAML
98       "formfu"  : Locale::Maketext::Extract::Plugin::FormFu
99       "mason"   : Locale::Maketext::Extract::Plugin::Mason
100       "text"    : Locale::Maketext::Extract::Plugin::TextTemplate
101       "generic" : Locale::Maketext::Extract::Plugin::Generic
102
103   Warnings:
104       If a parser plugin encounters a syntax error while parsing, it will
105       abort parsing and hand over to the next parser plugin.  If warnings are
106       turned on then the error will be echoed to STDERR.
107
108       Off by default, unless any plugin has been specified on the command
109       line.
110
111       -w|--warnings
112       -now|--nowarnings
113
114   Verbose:
115       If you would like to see which files have been processed, which plugins
116       were used, and which strings were extracted, then enable "verbose". If
117       no acceptable plugin was found, or no strings were extracted, then the
118       file is not listed:
119
120       -v|--verbose
121           Lists processed files.
122
123       -v -v|--verbose --verbose :
124           Lists processed files and which plugins managed to extract strings.
125
126       -v -v|--verbose --verbose :
127           Lists processed files, which plugins managed to extract strings,
128           and the extracted strings, the line where they were found, and any
129           variables.
130

SEE ALSO

132       Locale::Maketext::Extract
133       Locale::Maketext::Lexicon::Gettext
134       Locale::Maketext
135       Locale::Maketext::Extract::Plugin::Perl
136       Locale::Maketext::Extract::Plugin::PPI
137       Locale::Maketext::Extract::Plugin::TT2
138       Locale::Maketext::Extract::Plugin::YAML
139       Locale::Maketext::Extract::Plugin::FormFu
140       Locale::Maketext::Extract::Plugin::Mason
141       Locale::Maketext::Extract::Plugin::TextTemplate
142       Locale::Maketext::Extract::Plugin::Generic
143

AUTHORS

145       Audrey Tang <cpan@audreyt.org>
146
148       Copyright 2002-2008 by Audrey Tang <cpan@audreyt.org>.
149
150       This software is released under the MIT license cited below.
151
152   The "MIT" License
153       Permission is hereby granted, free of charge, to any person obtaining a
154       copy of this software and associated documentation files (the
155       "Software"), to deal in the Software without restriction, including
156       without limitation the rights to use, copy, modify, merge, publish,
157       distribute, sublicense, and/or sell copies of the Software, and to
158       permit persons to whom the Software is furnished to do so, subject to
159       the following conditions:
160
161       The above copyright notice and this permission notice shall be included
162       in all copies or substantial portions of the Software.
163
164       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
165       OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
166       MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
167       IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
168       CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
169       TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
170       SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
171

AUTHORS

173       ·   Clinton Gormley <drtech@cpan.org>
174
175       ·   Audrey Tang <cpan@audreyt.org>
176
178       This software is Copyright (c) 2014 by Audrey Tang.
179
180       This is free software, licensed under:
181
182         The MIT (X11) License
183
184
185
186perl v5.30.1                      2020-01-30                       XGETTEXT(1)
Impressum