xgettext
[options] filesxgettext -h
Solaris only. Extract messages (specially marked strings) from C and C++ source files. Place them in a "portable object" file (file.po
) for translation and compilation by msgfmt. By default, xgettext only extracts strings 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.
-a
Extract all strings, not just those in calls to gettext
or dgettext
.
-c
tagCopy source file comments marked with tag into the .po
file as #
-delimited comments.
-d
domainUse domain.po
as the output file instead of messages.po.
-h
Print a help message on the standard output.
-j
Join (merge) extracted messages with those in the current .po
file. Domain directives in the existing .po
file are ignored.
-m
prefixFill each msgstr
with prefix. Intended for debugging.
-M
suffixFill each msgstr
with suffix. Intended for debugging.
-n
Add comments to the .po
file indicating the source filename and line number where each string is used.
-p
pathPlace output files in the directory path.
-s
Sort the output by msgid
(original string), with all duplicates removed.
-x
exfileexfile is a .po
file with msgid
s that are not to be extracted (i.e., excluded).