xgettext
[
options
]
files
xgettext -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
tag
Copy source file comments marked with tag
into the .po
file as #
-delimited comments.
-d
domain
Use 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
prefix
Fill each msgstr
with prefix
. Intended for debugging.
-M
suffix
Fill 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
path
Place output files in the directory path
.
-s
Sort the output by msgid
(original string), with all duplicates removed.
-x
exfile
exfile
is a .po
file with msgid
s that are not to be extracted (i.e., excluded).