xgettext
xgettext [options
]files
xgettext -h
Solaris and GNU/Linux only. Extract messages (specially
marked strings) from C and C++ source files. Place them in a
"portable object" file (.po
)
for translation and compilation by msgfmt. By default, xgettext extracts strings only inside
calls to the gettext (3C) and
dgettext (3C) functions. Source files are
named on the command line. A filename of -
indicates the standard input. See also
gettext and msgfmt.
GNU gettext extends the original Solaris gettext design and is able to extract strings from source files for a large number of languages. The URL for it is http://www.info-zip.org/.
-a
,
--extract-all
Extract all strings, not just those in calls to
gettext
or dgettext
. (GNU/Linux: applies to
languages C
, C++
, ObjectiveC
, Shell
, Python
, Lisp
, EmacsLisp
, librep
, Scheme
, Java
, C#
, awk
, Tcl
, Perl
, PHP
, GCC-source
, and Glade
.)
-c
tag
,
--add-comments
[=
tag
]Copy source file comments marked with
tag into the .po
file as #
-delimited comments.
-d
domain
,
--default-domain=
domain
Use domain
.po
as the output file instead of
messages.po
.
-h
, --help
Print a help message on the standard output.
-j
,
--join-existing
Join (merge) extracted messages with those in the
current .po
file. Domain
directives in the existing .po
file are ignored.
-m
prefix
,
--msgstrr-prefix=
prefix
Fill in each msgstr
with prefix. Intended for debugging.
The GNU version allows prefix to be
optional.
-M
suffix
,
--msgstr-suffix=
suffix
Fill in each msgstr
with suffix
No credit card required