xgettext.pl - Extract gettext strings from source
xgettext.pl [ -u ] [ -o FILE ] [ INPUTFILE... ]
Extract translatable strings from given input files.
Currently accepts Perl source files (valid localization function names include maketext, loc, x and _), HTML::Mason templates (<&|/l>...</&> or <&|/loc>...</&>), and Template Toolkit files ([%|l%]...[%END%] or [%|loc%]...[%END%]).
maketext
loc
x
_
<&|/l>...</&>
<&|/loc>...</&>
[%|l%]...[%END%]
[%|loc%]...[%END%]
The -o flag specifies a PO file name to be written or incrementally updated; - means writing to STDOUT. If not specified, messages.po is used.
-
The -u flag 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.
Thanks to Jesse Vincent for contributing to the early version of this utility.
Locale::Maketext, Locale::Maketext::Lexicon::Gettext
Autrijus Tang <autrijus@autrijus.org>
Copyright 2002 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
To install Locale::Maketext::Lexicon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Locale::Maketext::Lexicon
CPAN shell
perl -MCPAN -e shell install Locale::Maketext::Lexicon
For more information on module installation, please visit the detailed CPAN module installation guide.