1XGETTEXT(1)                           GNU                          XGETTEXT(1)
2
3
4

NAME

6       xgettext - extract gettext strings from source
7

SYNOPSIS

9       xgettext [OPTION] [INPUTFILE]...
10

DESCRIPTION

12       Extract translatable strings from given input files.
13
14       Mandatory  arguments  to  long  options are mandatory for short options
15       too.  Similarly for optional arguments.
16
17   Input file location:
18       INPUTFILE ...
19              input files
20
21       -f, --files-from=FILE
22              get list of input files from FILE
23
24       -D, --directory=DIRECTORY
25              add DIRECTORY to list for input files search
26
27       If input file is -, standard input is read.
28
29   Output file location:
30       -d, --default-domain=NAME
31              use NAME.po for output (instead of messages.po)
32
33       -o, --output=FILE
34              write output to specified file
35
36       -p, --output-dir=DIR
37              output files will be placed in directory DIR
38
39       If output file is -, output is written to standard output.
40
41   Choice of input file language:
42       -L, --language=NAME
43              recognise the specified language (C, C++, ObjectiveC, PO, Shell,
44              Python,   Lisp,  EmacsLisp,  librep,  Scheme,  Smalltalk,  Java,
45              JavaProperties,  C#,  awk,  YCP,  Tcl,  Perl,  PHP,  GCC-source,
46              NXStringTable, RST, Glade)
47
48       -C, --c++
49              shorthand for --language=C++
50
51       By  default  the  language  is guessed depending on the input file name
52       extension.
53
54   Input file interpretation:
55       --from-code=NAME
56              encoding of input files (except for Python, Tcl, Glade)
57
58       By default the input files are assumed to be in ASCII.
59
60   Operation mode:
61       -j, --join-existing
62              join messages with existing file
63
64       -x, --exclude-file=FILE.po
65              entries from FILE.po are not extracted
66
67       -c, --add-comments[=TAG]
68              place comment block with TAG (or those preceding keyword  lines)
69              in output file
70
71   Language specific options:
72       -a, --extract-all
73              extract  all  strings (only languages C, C++, ObjectiveC, Shell,
74              Python, Lisp, EmacsLisp, librep, Scheme,  Java,  C#,  awk,  Tcl,
75              Perl, PHP, GCC-source, Glade)
76
77       -k, --keyword[=WORD]
78              additional  keyword  to be looked for (without WORD means not to
79              use default keywords)
80
81              (only languages C, C++, ObjectiveC, Shell, Python,  Lisp,  Emac‐
82              sLisp,  librep,  Scheme,  Java,  C#,  awk,  Tcl, Perl, PHP, GCC-
83              source, Glade)
84
85       --flag=WORD:ARG:FLAG
86              additional flag for strings inside the argument  number  ARG  of
87              keyword WORD
88
89              (only  languages  C, C++, ObjectiveC, Shell, Python, Lisp, Emac‐
90              sLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP,  GCC-
91              source)
92
93       -T, --trigraphs
94              understand  ANSI  C  trigraphs for input (only languages C, C++,
95              ObjectiveC)
96
97       --qt   recognize Qt format strings (only language C++)
98
99       --kde  recognize KDE 4 format strings (only language C++)
100
101       --boost
102              recognize Boost format strings (only language C++)
103
104       --debug
105              more detailed formatstring recognition result
106
107   Output details:
108       -e, --no-escape
109              do not use C escapes in output (default)
110
111       -E, --escape
112              use C escapes in output, no extended chars
113
114       --force-po
115              write PO file even if empty
116
117       -i, --indent
118              write the .po file using indented style
119
120       --no-location
121              do not write '#: filename:line' lines
122
123       -n, --add-location
124              generate '#: filename:line' lines (default)
125
126       --strict
127              write out strict Uniforum conforming .po file
128
129       --properties-output
130              write out a Java .properties file
131
132       --stringtable-output
133              write out a NeXTstep/GNUstep .strings file
134
135       -w, --width=NUMBER
136              set output page width
137
138       --no-wrap
139              do not break long message lines, longer  than  the  output  page
140              width, into several lines
141
142       -s, --sort-output
143              generate sorted output
144
145       -F, --sort-by-file
146              sort output by file location
147
148       --omit-header
149              don't write header with `msgid ""' entry
150
151       --copyright-holder=STRING
152              set copyright holder in output
153
154       --foreign-user
155              omit FSF copyright in output for foreign user
156
157       --package-name=PACKAGE
158              set package name in output
159
160       --package-version=VERSION
161              set package version in output
162
163       --msgid-bugs-address=EMAIL@ADDRESS
164              set report address for msgid bugs
165
166       -m, --msgstr-prefix[=STRING]
167              use STRING or "" as prefix for msgstr entries
168
169       -M, --msgstr-suffix[=STRING]
170              use STRING or "" as suffix for msgstr entries
171
172   Informative output:
173       -h, --help
174              display this help and exit
175
176       -V, --version
177              output version information and exit
178

AUTHOR

180       Written by Ulrich Drepper.
181

REPORTING BUGS

183       Report bugs to <bug-gnu-gettext@gnu.org>.
184
186       Copyright   ©  1995-1998,  2000-2007  Free  Software  Foundation,  Inc.
187       License     GPLv3+:     GNU     GPL     version     3     or      later
188       <http://gnu.org/licenses/gpl.html>
189       This  is  free  software:  you  are free to change and redistribute it.
190       There is NO WARRANTY, to the extent permitted by law.
191

SEE ALSO

193       The full documentation for xgettext is maintained as a Texinfo  manual.
194       If  the info and xgettext programs are properly installed at your site,
195       the command
196
197              info xgettext
198
199       should give you access to the complete manual.
200
201
202
203GNU gettext-tools 0.17           November 2007                     XGETTEXT(1)
Impressum