NAME
xgettext.pl - Extract gettext strings from source
SYNOPSIS
xgettext.pl [ -u ] [ -g ] [ -o outputfile ] [ inputfile... ]
OPTIONS
[ -u ] Disables conversion from Maketext format to Gettext format -- i.e. it leaves all brackets alone. This is useful if you are also using the Gettext syntax in your program.
[ -g ] Enables GNU gettext interoperability by printing #, maketext-format
before each entry that has %
variables.
[ -o outputfile ] PO file name to be written or incrementally updated -
means writing to STDOUT. If not specified, messages.po is used.
[ inputfile... ] is the files to extract messages from.
DESCRIPTION
This program extracts translatable strings from given input files, or STDIN if none are given.
Currently the following formats of input files are supported:
- Perl source files
-
Valid localization function names are:
translate
,maketext
,loc
,x
,_
and__
. - HTML::Mason
-
The text inside
<&|/l>...</&>
or<&|/loc>...</&>
will be extracted. - Template Toolkit
-
Texts inside
[%|l%]...[%END%]
or[%|loc%]...[%END%]
are extracted. - Text::Template
-
Sentences of texts between
STARTxxx
andENDxxx
are extracted.
ACKNOWLEDGMENTS
Thanks to Jesse Vincent for contributing to an early version of this utility.
Also to Alain Barbet, who effectively re-wrote the source parser with a flex-like algorithm.
SEE ALSO
Locale::Maketext, Locale::Maketext::Lexicon::Gettext
AUTHORS
Autrijus Tang <autrijus@autrijus.org>
COPYRIGHT
Copyright 2002, 2003 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 297:
You forgot a '=back' before '=head1'