Name
xgettext
Synopsis
xgettext [options]filesxgettext -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/.
Common Options
-a,--extract-allExtract all strings, not just those in calls to
gettextordgettext. (GNU/Linux: applies to languagesC,C++,ObjectiveC,Shell,Python,Lisp,EmacsLisp,librep,Scheme,Java,C#,awk,Tcl,Perl,PHP,GCC-source, andGlade.)-ctag,--add-comments[=tag]Copy source file comments marked with tag into the
.pofile as#-delimited comments.-ddomain,--default-domain=domainUse
domain.poas the output file instead of messages.po.-h,--helpPrint a help message on the standard output.
-j,--join-existingJoin (merge) extracted messages with those in the current
.pofile. Domain directives in the existing.pofile are ignored.-mprefix,--msgstrr-prefix=prefixFill in each
msgstrwith prefix. Intended for debugging. The GNU version allows prefix to be optional.-Msuffix,--msgstr-suffix=suffixFill in each
msgstrwith suffix