1XGETTEXT(1) GNU XGETTEXT(1)
2
3
4
6 xgettext - extract gettext strings from source
7
9 xgettext [OPTION] [INPUTFILE]...
10
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 --boost
100 recognize Boost format strings (only language C++)
101
102 --debug
103 more detailed formatstring recognition result
104
105 Output details:
106 -e, --no-escape
107 do not use C escapes in output (default)
108
109 -E, --escape
110 use C escapes in output, no extended chars
111
112 --force-po
113 write PO file even if empty
114
115 -i, --indent
116 write the .po file using indented style
117
118 --no-location
119 do not write '#: filename:line' lines
120
121 -n, --add-location
122 generate '#: filename:line' lines (default)
123
124 --strict
125 write out strict Uniforum conforming .po file
126
127 --properties-output
128 write out a Java .properties file
129
130 --stringtable-output
131 write out a NeXTstep/GNUstep .strings file
132
133 -w, --width=NUMBER
134 set output page width
135
136 --no-wrap
137 do not break long message lines, longer than the output page
138 width, into several lines
139
140 -s, --sort-output
141 generate sorted output
142
143 -F, --sort-by-file
144 sort output by file location
145
146 --omit-header
147 don't write header with `msgid ""' entry
148
149 --copyright-holder=STRING
150 set copyright holder in output
151
152 --foreign-user
153 omit FSF copyright in output for foreign user
154
155 --msgid-bugs-address=EMAIL@ADDRESS
156 set report address for msgid bugs
157
158 -m, --msgstr-prefix[=STRING]
159 use STRING or "" as prefix for msgstr entries
160
161 -M, --msgstr-suffix[=STRING]
162 use STRING or "" as suffix for msgstr entries
163
164 Informative output:
165 -h, --help
166 display this help and exit
167
168 -V, --version
169 output version information and exit
170
172 Written by Ulrich Drepper.
173
175 Report bugs to <bug-gnu-gettext@gnu.org>.
176
178 Copyright © 1995-1998, 2000-2006 Free Software Foundation, Inc.
179 This is free software; see the source for copying conditions. There is
180 NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
181 PURPOSE.
182
184 The full documentation for xgettext is maintained as a Texinfo manual.
185 If the info and xgettext programs are properly installed at your site,
186 the command
187
188 info xgettext
189
190 should give you access to the complete manual.
191
192
193
194GNU gettext-tools 0.16.1 November 2006 XGETTEXT(1)