UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: xargsChapter 2
Unix Commands
Next: Reference: yacc
 

xgettext

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.

Options

-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 msgids that are not to be extracted (i.e., excluded).


Previous: Reference: xargsUNIX in a Nutshell: System V EditionNext: Reference: yacc
Reference: xargsBook IndexReference: yacc

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System