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       -cTAG, --add-comments=TAG
68              place comment blocks starting with  TAG  and  preceding  keyword
69              lines in output file
70
71       -c, --add-comments
72              place all comment blocks preceding keyword lines in output file
73
74   Language specific options:
75       -a, --extract-all
76              extract  all  strings (only languages C, C++, ObjectiveC, Shell,
77              Python, Lisp, EmacsLisp, librep, Scheme,  Java,  C#,  awk,  Tcl,
78              Perl, PHP, GCC-source, Glade)
79
80       -kWORD, --keyword=WORD
81              look for WORD as an additional keyword
82
83       -k, --keyword
84              do  not  to  use default keywords (only languages C, C++, Objec‐
85              tiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#,
86              awk, Tcl, Perl, PHP, GCC-source, Glade)
87
88       --flag=WORD:ARG:FLAG
89              additional  flag  for  strings inside the argument number ARG of
90              keyword WORD
91
92              (only languages C, C++, ObjectiveC, Shell, Python,  Lisp,  Emac‐
93              sLisp,  librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP, GCC-
94              source)
95
96       -T, --trigraphs
97              understand ANSI C trigraphs for input (only  languages  C,  C++,
98              ObjectiveC)
99
100       --qt   recognize Qt format strings (only language C++)
101
102       --kde  recognize KDE 4 format strings (only language C++)
103
104       --boost
105              recognize Boost format strings (only language C++)
106
107       --debug
108              more detailed formatstring recognition result
109
110   Output details:
111       --color
112              use colors and other text attributes always
113
114       --color=WHEN
115              use  colors  and  other  text  attributes  if WHEN.  WHEN may be
116              'always', 'never', 'auto', or 'html'.
117
118       --style=STYLEFILE
119              specify CSS style rule file for --color
120
121       -e, --no-escape
122              do not use C escapes in output (default)
123
124       -E, --escape
125              use C escapes in output, no extended chars
126
127       --force-po
128              write PO file even if empty
129
130       -i, --indent
131              write the .po file using indented style
132
133       --no-location
134              do not write '#: filename:line' lines
135
136       -n, --add-location
137              generate '#: filename:line' lines (default)
138
139       --strict
140              write out strict Uniforum conforming .po file
141
142       --properties-output
143              write out a Java .properties file
144
145       --stringtable-output
146              write out a NeXTstep/GNUstep .strings file
147
148       -w, --width=NUMBER
149              set output page width
150
151       --no-wrap
152              do not break long message lines, longer  than  the  output  page
153              width, into several lines
154
155       -s, --sort-output
156              generate sorted output
157
158       -F, --sort-by-file
159              sort output by file location
160
161       --omit-header
162              don't write header with `msgid ""' entry
163
164       --copyright-holder=STRING
165              set copyright holder in output
166
167       --foreign-user
168              omit FSF copyright in output for foreign user
169
170       --package-name=PACKAGE
171              set package name in output
172
173       --package-version=VERSION
174              set package version in output
175
176       --msgid-bugs-address=EMAIL@ADDRESS
177              set report address for msgid bugs
178
179       -m[STRING], --msgstr-prefix[=STRING]
180              use STRING or "" as prefix for msgstr values
181
182       -M[STRING], --msgstr-suffix[=STRING]
183              use STRING or "" as suffix for msgstr values
184
185   Informative output:
186       -h, --help
187              display this help and exit
188
189       -V, --version
190              output version information and exit
191

AUTHOR

193       Written by Ulrich Drepper.
194

REPORTING BUGS

196       Report bugs to <bug-gnu-gettext@gnu.org>.
197
199       Copyright   ©  1995-1998,  2000-2010  Free  Software  Foundation,  Inc.
200       License     GPLv3+:     GNU     GPL     version     3     or      later
201       <http://gnu.org/licenses/gpl.html>
202       This  is  free  software:  you  are free to change and redistribute it.
203       There is NO WARRANTY, to the extent permitted by law.
204

SEE ALSO

206       The full documentation for xgettext is maintained as a Texinfo  manual.
207       If  the info and xgettext programs are properly installed at your site,
208       the command
209
210              info xgettext
211
212       should give you access to the complete manual.
213
214
215
216GNU gettext-tools 0.18.1           June 2010                       XGETTEXT(1)
Impressum