1@pindex msgconv
2@cindex @code{msgconv} program, usage
3@example
4msgconv [@var{option}] [@var{inputfile}]
5@end example
6
7@cindex convert translations to a different encoding
8The @code{msgconv} program converts a translation catalog to a different
9character encoding.
10
11@subsection Input file location
12
13@table @samp
14@item @var{inputfile}
15Input PO file.
16
17@item -D @var{directory}
18@itemx --directory=@var{directory}
19@opindex -D@r{, @code{msgconv} option}
20@opindex --directory@r{, @code{msgconv} option}
21Add @var{directory} to the list of directories.  Source files are
22searched relative to this list of directories.  The resulting @file{.po}
23file will be written relative to the current directory, though.
24
25@end table
26
27If no @var{inputfile} is given or if it is @samp{-}, standard input is read.
28
29@subsection Output file location
30
31@table @samp
32@item -o @var{file}
33@itemx --output-file=@var{file}
34@opindex -o@r{, @code{msgconv} option}
35@opindex --output-file@r{, @code{msgconv} option}
36Write output to specified file.
37
38@end table
39
40The results are written to standard output if no output file is specified
41or if it is @samp{-}.
42
43@subsection Conversion target
44
45@table @samp
46@item -t
47@itemx --to-code=@var{name}
48@opindex -t@r{, @code{msgconv} option}
49@opindex --to-code@r{, @code{msgconv} option}
50Specify encoding for output.
51
52@end table
53
54The default encoding is the current locale's encoding.
55
56@subsection Input file syntax
57
58@table @samp
59@item -P
60@itemx --properties-input
61@opindex -P@r{, @code{msgconv} option}
62@opindex --properties-input@r{, @code{msgconv} option}
63Assume the input file is a Java ResourceBundle in Java @code{.properties}
64syntax, not in PO file syntax.
65
66@item --stringtable-input
67@opindex --stringtable-input@r{, @code{msgonv} option}
68Assume the input file is a NeXTstep/GNUstep localized resource file in
69@code{.strings} syntax, not in PO file syntax.
70
71@end table
72
73@subsection Output details
74
75@c --no-escape and --escape omitted on purpose.  They are not useful.
76
77@table @samp
78@item --force-po
79@opindex --force-po@r{, @code{msgconv} option}
80Always write an output file even if it contains no message.
81
82@item -i
83@itemx --indent
84@opindex -i@r{, @code{msgconv} option}
85@opindex --indent@r{, @code{msgconv} option}
86Write the .po file using indented style.
87
88@item --no-location
89@opindex --no-location@r{, @code{msgconv} option}
90Do not write @samp{#: @var{filename}:@var{line}} lines.
91
92@item --add-location
93@opindex --add-location@r{, @code{msgconv} option}
94Generate @samp{#: @var{filename}:@var{line}} lines (default).
95
96@item --strict
97@opindex --strict@r{, @code{msgconv} option}
98Write out a strict Uniforum conforming PO file.  Note that this
99Uniforum format should be avoided because it doesn't support the
100GNU extensions.
101
102@item -p
103@itemx --properties-output
104@opindex -p@r{, @code{msgconv} option}
105@opindex --properties-output@r{, @code{msgconv} option}
106Write out a Java ResourceBundle in Java @code{.properties} syntax.  Note
107that this file format doesn't support plural forms and silently drops
108obsolete messages.
109
110@item --stringtable-output
111@opindex --stringtable-output@r{, @code{msgconv} option}
112Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
113Note that this file format doesn't support plural forms.
114
115@item -w @var{number}
116@itemx --width=@var{number}
117@opindex -w@r{, @code{msgconv} option}
118@opindex --width@r{, @code{msgconv} option}
119Set the output page width.  Long strings in the output files will be
120split across multiple lines in order to ensure that each line's width
121(= number of screen columns) is less or equal to the given @var{number}.
122
123@item --no-wrap
124@opindex --no-wrap@r{, @code{msgconv} option}
125Do not break long message lines.  Message lines whose width exceeds the
126output page width will not be split into several lines.  Only file reference
127lines which are wider than the output page width will be split.
128
129@item -s
130@itemx --sort-output
131@opindex -s@r{, @code{msgconv} option}
132@opindex --sort-output@r{, @code{msgconv} option}
133Generate sorted output.  Note that using this option makes it much harder
134for the translator to understand each message's context.
135
136@item -F
137@itemx --sort-by-file
138@opindex -F@r{, @code{msgconv} option}
139@opindex --sort-by-file@r{, @code{msgconv} option}
140Sort output by file location.
141
142@end table
143
144@subsection Informative output
145
146@table @samp
147@item -h
148@itemx --help
149@opindex -h@r{, @code{msgconv} option}
150@opindex --help@r{, @code{msgconv} option}
151Display this help and exit.
152
153@item -V
154@itemx --version
155@opindex -V@r{, @code{msgconv} option}
156@opindex --version@r{, @code{msgconv} option}
157Output version information and exit.
158
159@end table
160