1 <!-- Creator : groff version 1.22.3 -->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
3 "http://www.w3.org/TR/html4/loose.dtd">
6 <meta name="generator" content="groff -Thtml, see www.gnu.org">
7 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
8 <meta name="Content-Style" content="text/css">
9 <style type="text/css">
10 p { margin-top: 0; margin-bottom: 0; vertical-align: top }
11 pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
12 table { margin-top: 0; margin-bottom: 0; vertical-align: top }
13 h1 { text-align: center }
15 <title>XGETTEXT</title>
20 <h1 align="center">XGETTEXT</h1>
22 <a href="#NAME">NAME</a><br>
23 <a href="#SYNOPSIS">SYNOPSIS</a><br>
24 <a href="#DESCRIPTION">DESCRIPTION</a><br>
25 <a href="#AUTHOR">AUTHOR</a><br>
26 <a href="#REPORTING BUGS">REPORTING BUGS</a><br>
27 <a href="#COPYRIGHT">COPYRIGHT</a><br>
28 <a href="#SEE ALSO">SEE ALSO</a><br>
38 <p style="margin-left:11%; margin-top: 1em">xgettext
39 − extract gettext strings from source</p>
42 <a name="SYNOPSIS"></a>
47 <p style="margin-left:11%; margin-top: 1em"><b>xgettext</b>
48 [<i>OPTION</i>] [<i>INPUTFILE</i>]...</p>
51 <a name="DESCRIPTION"></a>
55 <p style="margin-left:11%; margin-top: 1em">Extract
56 translatable strings from given input files.</p>
58 <p style="margin-left:11%; margin-top: 1em">Mandatory
59 arguments to long options are mandatory for short options
60 too. Similarly for optional arguments.</p>
62 <p style="margin-left:11%; margin-top: 1em"><b>Input file
66 <p style="margin-left:22%;">input files</p>
68 <p style="margin-left:11%;"><b>−f</b>,
69 <b>−−files−from</b>=<i>FILE</i></p>
71 <p style="margin-left:22%;">get list of input files from
74 <p style="margin-left:11%;"><b>−D</b>,
75 <b>−−directory</b>=<i>DIRECTORY</i></p>
77 <p style="margin-left:22%;">add DIRECTORY to list for input
80 <p style="margin-left:11%; margin-top: 1em">If input file
81 is -, standard input is read.</p>
83 <p style="margin-left:11%; margin-top: 1em"><b>Output file
86 <b>−−default−domain</b>=<i>NAME</i></p>
88 <p style="margin-left:22%;">use NAME.po for output (instead
91 <p style="margin-left:11%;"><b>−o</b>,
92 <b>−−output</b>=<i>FILE</i></p>
94 <p style="margin-left:22%;">write output to specified
97 <p style="margin-left:11%;"><b>−p</b>,
98 <b>−−output−dir</b>=<i>DIR</i></p>
100 <p style="margin-left:22%;">output files will be placed in
103 <p style="margin-left:11%; margin-top: 1em">If output file
104 is -, output is written to standard output.</p>
106 <p style="margin-left:11%; margin-top: 1em"><b>Choice of
107 input file language: <br>
108 −L</b>, <b>−−language</b>=<i>NAME</i></p>
110 <p style="margin-left:22%;">recognise the specified
111 language (C, C++, ObjectiveC, PO, Shell, Python, Lisp,
112 EmacsLisp, librep, Scheme, Smalltalk, Java, JavaProperties,
113 C#, awk, YCP, Tcl, Perl, PHP, GCC-source, NXStringTable,
114 RST, Glade, Lua, JavaScript, Vala, Desktop)</p>
116 <p style="margin-left:11%;"><b>−C</b>,
117 <b>−−c</b>++</p>
119 <p style="margin-left:22%;">shorthand for
120 <b>−−language</b>=<i>C</i>++</p>
122 <p style="margin-left:11%; margin-top: 1em">By default the
123 language is guessed depending on the input file name
126 <p style="margin-left:11%; margin-top: 1em"><b>Input file
128 −−from−code</b>=<i>NAME</i></p>
130 <p style="margin-left:22%;">encoding of input files (except
131 for Python, Tcl, Glade)</p>
133 <p style="margin-left:11%; margin-top: 1em">By default the
134 input files are assumed to be in ASCII.</p>
136 <p style="margin-left:11%; margin-top: 1em"><b>Operation
138 −j</b>, <b>−−join−existing</b></p>
140 <p style="margin-left:22%;">join messages with existing
143 <p style="margin-left:11%;"><b>−x</b>,
144 <b>−−exclude−file</b>=<i>FILE</i>.po</p>
146 <p style="margin-left:22%;">entries from FILE.po are not
149 <p style="margin-left:11%;"><b>−cTAG</b>,
150 <b>−−add−comments</b>=<i>TAG</i></p>
152 <p style="margin-left:22%;">place comment blocks starting
153 with TAG and preceding keyword lines in output file</p>
155 <p style="margin-left:11%;"><b>−c</b>,
156 <b>−−add−comments</b></p>
158 <p style="margin-left:22%;">place all comment blocks
159 preceding keyword lines in output file</p>
162 <p style="margin-left:11%;"><b>−−check</b>=<i>NAME</i></p>
164 <p style="margin-left:22%;">perform syntax check on
165 messages (ellipsis-unicode, space-ellipsis,</p>
168 <p style="margin-left:22%; margin-top: 1em">quote-unicode)</p>
171 <p style="margin-left:11%;"><b>−−sentence−end</b>=<i>TYPE</i></p>
173 <p style="margin-left:22%;">type describing the end of
174 sentence (single-space, which is the default,</p>
176 <p style="margin-left:22%; margin-top: 1em">or
179 <p style="margin-left:11%; margin-top: 1em"><b>Language
180 specific options: <br>
181 −a</b>, <b>−−extract−all</b></p>
183 <p style="margin-left:22%;">extract all strings (only
184 languages C, C++, ObjectiveC, Shell, Python, Lisp,
185 EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP,
186 GCC-source, Glade, Lua, JavaScript, Vala)</p>
188 <p style="margin-left:11%;"><b>−kWORD</b>,
189 <b>−−keyword</b>=<i>WORD</i></p>
191 <p style="margin-left:22%;">look for WORD as an additional
194 <p style="margin-left:11%;"><b>−k</b>,
195 <b>−−keyword</b></p>
197 <p style="margin-left:22%;">do not to use default keywords
198 (only languages C, C++, ObjectiveC, Shell, Python, Lisp,
199 EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP,
200 GCC-source, Glade, Lua, JavaScript, Vala, Desktop)</p>
203 <p style="margin-left:11%;"><b>−−flag</b>=<i>WORD</i>:ARG:FLAG</p>
205 <p style="margin-left:22%;">additional flag for strings
206 inside the argument number ARG of keyword WORD</p>
208 <p style="margin-left:22%; margin-top: 1em">(only languages
209 C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep,
210 Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP, GCC-source, Lua,
211 JavaScript, Vala)</p>
213 <p style="margin-left:11%;"><b>−T</b>,
214 <b>−−trigraphs</b></p>
216 <p style="margin-left:22%;">understand ANSI C trigraphs for
217 input (only languages C, C++, ObjectiveC)</p>
219 <table width="100%" border="0" rules="none" frame="void"
220 cellspacing="0" cellpadding="0">
221 <tr valign="top" align="left">
222 <td width="11%"></td>
226 <p><b>−−qt</b></p></td>
231 <p>recognize Qt format strings (only language C++)</p></td>
234 <tr valign="top" align="left">
235 <td width="11%"></td>
239 <p><b>−−kde</b></p></td>
244 <p>recognize KDE 4 format strings (only language C++)</p></td>
249 <p style="margin-left:11%;"><b>−−boost</b></p>
251 <p style="margin-left:22%;">recognize Boost format strings
252 (only language C++)</p>
254 <p style="margin-left:11%;"><b>−−debug</b></p>
256 <p style="margin-left:22%;">more detailed formatstring
257 recognition result</p>
259 <p style="margin-left:11%; margin-top: 1em"><b>Output
261 −−color</b></p>
263 <p style="margin-left:22%;">use colors and other text
264 attributes always</p>
267 <p style="margin-left:11%;"><b>−−color</b>=<i>WHEN</i></p>
269 <p style="margin-left:22%;">use colors and other text
270 attributes if WHEN. WHEN may be ’always’,
271 ’never’, ’auto’, or
272 ’html’.</p>
275 <p style="margin-left:11%;"><b>−−style</b>=<i>STYLEFILE</i></p>
277 <p style="margin-left:22%;">specify CSS style rule file for
278 <b>−−color</b></p>
280 <p style="margin-left:11%;"><b>−e</b>,
281 <b>−−no−escape</b></p>
283 <p style="margin-left:22%;">do not use C escapes in output
286 <p style="margin-left:11%;"><b>−E</b>,
287 <b>−−escape</b></p>
289 <p style="margin-left:22%;">use C escapes in output, no
293 <p style="margin-left:11%;"><b>−−force−po</b></p>
295 <p style="margin-left:22%;">write PO file even if empty</p>
297 <p style="margin-left:11%;"><b>−i</b>,
298 <b>−−indent</b></p>
300 <p style="margin-left:22%;">write the .po file using
304 <p style="margin-left:11%;"><b>−−no−location</b></p>
306 <p style="margin-left:22%;">do not write ’#:
307 filename:line’ lines</p>
309 <p style="margin-left:11%;"><b>−n</b>,
310 <b>−−add−location</b></p>
312 <p style="margin-left:22%;">generate ’#:
313 filename:line’ lines (default)</p>
316 <p style="margin-left:11%;"><b>−−strict</b></p>
318 <p style="margin-left:22%;">write out strict Uniforum
319 conforming .po file</p>
322 <p style="margin-left:11%;"><b>−−properties−output</b></p>
324 <p style="margin-left:22%;">write out a Java .properties
328 <p style="margin-left:11%;"><b>−−stringtable−output</b></p>
330 <p style="margin-left:22%;">write out a NeXTstep/GNUstep
334 <p style="margin-left:11%;"><b>−−its</b>=<i>FILE</i></p>
336 <p style="margin-left:22%;">apply ITS rules from FILE</p>
339 <p style="margin-left:11%;"><b>−−itstool</b></p>
341 <p style="margin-left:22%;">write out itstool comments</p>
343 <p style="margin-left:11%;"><b>−w</b>,
344 <b>−−width</b>=<i>NUMBER</i></p>
346 <p style="margin-left:22%;">set output page width</p>
349 <p style="margin-left:11%;"><b>−−no−wrap</b></p>
351 <p style="margin-left:22%;">do not break long message
352 lines, longer than the output page width, into several
355 <p style="margin-left:11%;"><b>−s</b>,
356 <b>−−sort−output</b></p>
358 <p style="margin-left:22%;">generate sorted output</p>
360 <p style="margin-left:11%;"><b>−F</b>,
361 <b>−−sort−by−file</b></p>
363 <p style="margin-left:22%;">sort output by file
367 <p style="margin-left:11%;"><b>−−omit−header</b></p>
369 <p style="margin-left:22%;">don’t write header with
370 ’msgid ""’ entry</p>
373 <p style="margin-left:11%;"><b>−−copyright−holder</b>=<i>STRING</i></p>
375 <p style="margin-left:22%;">set copyright holder in
379 <p style="margin-left:11%;"><b>−−foreign−user</b></p>
381 <p style="margin-left:22%;">omit FSF copyright in output
385 <p style="margin-left:11%;"><b>−−package−name</b>=<i>PACKAGE</i></p>
387 <p style="margin-left:22%;">set package name in output</p>
390 <p style="margin-left:11%;"><b>−−package−version</b>=<i>VERSION</i></p>
392 <p style="margin-left:22%;">set package version in
396 <p style="margin-left:11%;"><b>−−msgid−bugs−address</b>=<i>EMAIL</i>@ADDRESS</p>
398 <p style="margin-left:22%;">set report address for msgid
401 <p style="margin-left:11%;"><b>−m[STRING]</b>,
402 <b>−−msgstr−prefix</b>[=<i>STRING</i>]</p>
404 <p style="margin-left:22%;">use STRING or "" as
405 prefix for msgstr values</p>
407 <p style="margin-left:11%;"><b>−M[STRING]</b>,
408 <b>−−msgstr−suffix</b>[=<i>STRING</i>]</p>
410 <p style="margin-left:22%;">use STRING or "" as
411 suffix for msgstr values</p>
413 <p style="margin-left:11%; margin-top: 1em"><b>Informative
415 −h</b>, <b>−−help</b></p>
417 <p style="margin-left:22%;">display this help and exit</p>
419 <p style="margin-left:11%;"><b>−V</b>,
420 <b>−−version</b></p>
422 <p style="margin-left:22%;">output version information and
426 <a name="AUTHOR"></a>
430 <p style="margin-left:11%; margin-top: 1em">Written by
434 <a name="REPORTING BUGS"></a>
438 <p style="margin-left:11%; margin-top: 1em">Report bugs to
439 <bug-gnu-gettext@gnu.org>.</p>
442 <a name="COPYRIGHT"></a>
446 <p style="margin-left:11%; margin-top: 1em">Copyright
447 © 1995-1998, 2000-2013 Free Software Foundation, Inc.
448 License GPLv3+: GNU GPL version 3 or later
449 <http://gnu.org/licenses/gpl.html> <br>
450 This is free software: you are free to change and
451 redistribute it. There is NO WARRANTY, to the extent
452 permitted by law.</p>
455 <a name="SEE ALSO"></a>
459 <p style="margin-left:11%; margin-top: 1em">The full
460 documentation for <b>xgettext</b> is maintained as a Texinfo
461 manual. If the <b>info</b> and <b>xgettext</b> programs are
462 properly installed at your site, the command</p>
464 <p style="margin-left:22%; margin-top: 1em"><b>info
467 <p style="margin-left:11%; margin-top: 1em">should give you
468 access to the complete manual.</p>