~ubuntu-branches/ubuntu/trusty/gettext/trusty

« back to all changes in this revision

Viewing changes to gettext-tools/doc/gettext_10.html

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-10-21 19:12:18 UTC
  • mfrom: (2.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20131021191218-5t1ixdaae0dbc1l3
Tags: 0.18.3.1-1ubuntu1
* Merge with Debian; remaining changes:
  - Allow the package to cross-build.
  - Define a stage1 profile to build without java and git.
  - Throw away /usr/lib/gettext/gnu.gettext*; we don't need them.
  - Explicitly configure with --disable-csharp.
  - Keep gettext.jar in /usr/share/gettext instead of moving it to
    /usr/share/java.
  - Drop autopoint recommends of gettext. It pulls in git and
    other sizable packages which make the CDs explode.
* gettext-el: Add an alternative dependency on emacs24.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<HTML>
2
2
<HEAD>
3
3
<!-- This HTML file has been created by texi2html 1.52b
4
 
     from gettext.texi on 6 June 2010 -->
 
4
     from gettext.texi on 15 August 2013 -->
5
5
 
6
6
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
7
7
<TITLE>GNU gettext utilities - 10  Producing Binary MO Files</TITLE>
18
18
<H2><A NAME="SEC157" HREF="gettext_toc.html#TOC157">10.1  Invoking the <CODE>msgfmt</CODE> Program</A></H2>
19
19
 
20
20
<P>
21
 
<A NAME="IDX947"></A>
22
 
<A NAME="IDX948"></A>
 
21
<A NAME="IDX954"></A>
 
22
<A NAME="IDX955"></A>
23
23
 
24
24
<PRE>
25
25
msgfmt [<VAR>option</VAR>] <VAR>filename</VAR>.po ...
26
26
</PRE>
27
27
 
28
28
<P>
29
 
<A NAME="IDX949"></A>
 
29
<A NAME="IDX956"></A>
30
30
The <CODE>msgfmt</CODE> programs generates a binary message catalog from a textual
31
31
translation description.
32
32
 
43
43
<DD>
44
44
<DT><SAMP>&lsquo;--directory=<VAR>directory</VAR>&rsquo;</SAMP>
45
45
<DD>
46
 
<A NAME="IDX950"></A>
47
 
<A NAME="IDX951"></A>
 
46
<A NAME="IDX957"></A>
 
47
<A NAME="IDX958"></A>
48
48
Add <VAR>directory</VAR> to the list of directories.  Source files are
49
 
searched relative to this list of directories.  The resulting <TT>&lsquo;.po&rsquo;</TT>
 
49
searched relative to this list of directories.  The resulting binary
50
50
file will be written relative to the current directory, though.
51
51
 
52
52
</DL>
65
65
<DD>
66
66
<DT><SAMP>&lsquo;--java&rsquo;</SAMP>
67
67
<DD>
68
 
<A NAME="IDX952"></A>
69
 
<A NAME="IDX953"></A>
70
 
<A NAME="IDX954"></A>
 
68
<A NAME="IDX959"></A>
 
69
<A NAME="IDX960"></A>
 
70
<A NAME="IDX961"></A>
71
71
Java mode: generate a Java <CODE>ResourceBundle</CODE> class.
72
72
 
73
73
<DT><SAMP>&lsquo;--java2&rsquo;</SAMP>
74
74
<DD>
75
 
<A NAME="IDX955"></A>
 
75
<A NAME="IDX962"></A>
76
76
Like --java, and assume Java2 (JDK 1.2 or higher).
77
77
 
78
78
<DT><SAMP>&lsquo;--csharp&rsquo;</SAMP>
79
79
<DD>
80
 
<A NAME="IDX956"></A>
81
 
<A NAME="IDX957"></A>
 
80
<A NAME="IDX963"></A>
 
81
<A NAME="IDX964"></A>
82
82
C# mode: generate a .NET .dll file containing a subclass of
83
83
<CODE>GettextResourceSet</CODE>.
84
84
 
85
85
<DT><SAMP>&lsquo;--csharp-resources&rsquo;</SAMP>
86
86
<DD>
87
 
<A NAME="IDX958"></A>
88
 
<A NAME="IDX959"></A>
 
87
<A NAME="IDX965"></A>
 
88
<A NAME="IDX966"></A>
89
89
C# resources mode: generate a .NET <TT>&lsquo;.resources&rsquo;</TT> file.
90
90
 
91
91
<DT><SAMP>&lsquo;--tcl&rsquo;</SAMP>
92
92
<DD>
93
 
<A NAME="IDX960"></A>
94
 
<A NAME="IDX961"></A>
 
93
<A NAME="IDX967"></A>
 
94
<A NAME="IDX968"></A>
95
95
Tcl mode: generate a tcl/msgcat <TT>&lsquo;.msg&rsquo;</TT> file.
96
96
 
97
97
<DT><SAMP>&lsquo;--qt&rsquo;</SAMP>
98
98
<DD>
99
 
<A NAME="IDX962"></A>
100
 
<A NAME="IDX963"></A>
 
99
<A NAME="IDX969"></A>
 
100
<A NAME="IDX970"></A>
101
101
Qt mode: generate a Qt <TT>&lsquo;.qm&rsquo;</TT> file.
102
102
 
103
103
</DL>
112
112
<DD>
113
113
<DT><SAMP>&lsquo;--output-file=<VAR>file</VAR>&rsquo;</SAMP>
114
114
<DD>
115
 
<A NAME="IDX964"></A>
116
 
<A NAME="IDX965"></A>
 
115
<A NAME="IDX971"></A>
 
116
<A NAME="IDX972"></A>
117
117
Write output to specified file.
118
118
 
119
119
<DT><SAMP>&lsquo;--strict&rsquo;</SAMP>
120
120
<DD>
121
 
<A NAME="IDX966"></A>
 
121
<A NAME="IDX973"></A>
122
122
Direct the program to work strictly following the Uniforum/Sun
123
123
implementation.  Currently this only affects the naming of the output
124
124
file.  If this option is not given the name of the output file is the
145
145
<DD>
146
146
<DT><SAMP>&lsquo;--resource=<VAR>resource</VAR>&rsquo;</SAMP>
147
147
<DD>
148
 
<A NAME="IDX967"></A>
149
 
<A NAME="IDX968"></A>
 
148
<A NAME="IDX974"></A>
 
149
<A NAME="IDX975"></A>
150
150
Specify the resource name.
151
151
 
152
152
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
153
153
<DD>
154
154
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
155
155
<DD>
156
 
<A NAME="IDX969"></A>
157
 
<A NAME="IDX970"></A>
 
156
<A NAME="IDX976"></A>
 
157
<A NAME="IDX977"></A>
158
158
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
159
159
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
160
160
 
161
161
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
162
162
<DD>
163
 
<A NAME="IDX971"></A>
 
163
<A NAME="IDX978"></A>
164
164
Specify the base directory of classes directory hierarchy.
165
165
 
166
166
</DL>
181
181
<DD>
182
182
<DT><SAMP>&lsquo;--resource=<VAR>resource</VAR>&rsquo;</SAMP>
183
183
<DD>
184
 
<A NAME="IDX972"></A>
185
 
<A NAME="IDX973"></A>
 
184
<A NAME="IDX979"></A>
 
185
<A NAME="IDX980"></A>
186
186
Specify the resource name.
187
187
 
188
188
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
189
189
<DD>
190
190
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
191
191
<DD>
192
 
<A NAME="IDX974"></A>
193
 
<A NAME="IDX975"></A>
 
192
<A NAME="IDX981"></A>
 
193
<A NAME="IDX982"></A>
194
194
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
195
195
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
196
196
 
197
197
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
198
198
<DD>
199
 
<A NAME="IDX976"></A>
 
199
<A NAME="IDX983"></A>
200
200
Specify the base directory for locale dependent <TT>&lsquo;.dll&rsquo;</TT> files.
201
201
 
202
202
</DL>
217
217
<DD>
218
218
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
219
219
<DD>
220
 
<A NAME="IDX977"></A>
221
 
<A NAME="IDX978"></A>
 
220
<A NAME="IDX984"></A>
 
221
<A NAME="IDX985"></A>
222
222
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
223
223
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
224
224
 
225
225
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
226
226
<DD>
227
 
<A NAME="IDX979"></A>
 
227
<A NAME="IDX986"></A>
228
228
Specify the base directory of <TT>&lsquo;.msg&rsquo;</TT> message catalogs.
229
229
 
230
230
</DL>
244
244
<DD>
245
245
<DT><SAMP>&lsquo;--properties-input&rsquo;</SAMP>
246
246
<DD>
247
 
<A NAME="IDX980"></A>
248
 
<A NAME="IDX981"></A>
 
247
<A NAME="IDX987"></A>
 
248
<A NAME="IDX988"></A>
249
249
Assume the input files are Java ResourceBundles in Java <CODE>.properties</CODE>
250
250
syntax, not in PO file syntax.
251
251
 
252
252
<DT><SAMP>&lsquo;--stringtable-input&rsquo;</SAMP>
253
253
<DD>
254
 
<A NAME="IDX982"></A>
 
254
<A NAME="IDX989"></A>
255
255
Assume the input files are NeXTstep/GNUstep localized resource files in
256
256
<CODE>.strings</CODE> syntax, not in PO file syntax.
257
257
 
267
267
<DD>
268
268
<DT><SAMP>&lsquo;--check&rsquo;</SAMP>
269
269
<DD>
270
 
<A NAME="IDX983"></A>
271
 
<A NAME="IDX984"></A>
 
270
<A NAME="IDX990"></A>
 
271
<A NAME="IDX991"></A>
272
272
Perform all the checks implied by <CODE>--check-format</CODE>, <CODE>--check-header</CODE>,
273
273
<CODE>--check-domain</CODE>.
274
274
 
275
275
<DT><SAMP>&lsquo;--check-format&rsquo;</SAMP>
276
276
<DD>
277
 
<A NAME="IDX985"></A>
278
 
<A NAME="IDX986"></A>
 
277
<A NAME="IDX992"></A>
 
278
<A NAME="IDX993"></A>
279
279
Check language dependent format strings.
280
280
 
281
281
If the string represents a format string used in a
300
300
 
301
301
<DT><SAMP>&lsquo;--check-header&rsquo;</SAMP>
302
302
<DD>
303
 
<A NAME="IDX987"></A>
 
303
<A NAME="IDX994"></A>
304
304
Verify presence and contents of the header entry.  See section <A HREF="gettext_6.html#SEC44">6.2  Filling in the Header Entry</A>,
305
305
for a description of the various fields in the header entry.
306
306
 
307
307
<DT><SAMP>&lsquo;--check-domain&rsquo;</SAMP>
308
308
<DD>
309
 
<A NAME="IDX988"></A>
 
309
<A NAME="IDX995"></A>
310
310
Check for conflicts between domain directives and the <CODE>--output-file</CODE>
311
311
option
312
312
 
314
314
<DD>
315
315
<DT><SAMP>&lsquo;--check-compatibility&rsquo;</SAMP>
316
316
<DD>
317
 
<A NAME="IDX989"></A>
318
 
<A NAME="IDX990"></A>
319
 
<A NAME="IDX991"></A>
 
317
<A NAME="IDX996"></A>
 
318
<A NAME="IDX997"></A>
 
319
<A NAME="IDX998"></A>
320
320
Check that GNU msgfmt behaves like X/Open msgfmt.  This will give an error
321
321
when attempting to use the GNU extensions.
322
322
 
323
323
<DT><SAMP>&lsquo;--check-accelerators[=<VAR>char</VAR>]&rsquo;</SAMP>
324
324
<DD>
325
 
<A NAME="IDX992"></A>
326
 
<A NAME="IDX993"></A>
327
 
<A NAME="IDX994"></A>
328
 
<A NAME="IDX995"></A>
 
325
<A NAME="IDX999"></A>
 
326
<A NAME="IDX1000"></A>
 
327
<A NAME="IDX1001"></A>
 
328
<A NAME="IDX1002"></A>
329
329
Check presence of keyboard accelerators for menu items.  This is based on
330
330
the convention used in some GUIs that a keyboard accelerator in a menu
331
331
item string is designated by an immediately preceding <SAMP>&lsquo;&#38;&rsquo;</SAMP> character.
340
340
<DD>
341
341
<DT><SAMP>&lsquo;--use-fuzzy&rsquo;</SAMP>
342
342
<DD>
343
 
<A NAME="IDX996"></A>
344
 
<A NAME="IDX997"></A>
345
 
<A NAME="IDX998"></A>
 
343
<A NAME="IDX1003"></A>
 
344
<A NAME="IDX1004"></A>
 
345
<A NAME="IDX1005"></A>
346
346
Use fuzzy entries in output.  Note that using this option is usually wrong,
347
347
because fuzzy messages are exactly those which have not been validated by
348
348
a human translator.
359
359
<DD>
360
360
<DT><SAMP>&lsquo;--alignment=<VAR>number</VAR>&rsquo;</SAMP>
361
361
<DD>
362
 
<A NAME="IDX999"></A>
363
 
<A NAME="IDX1000"></A>
 
362
<A NAME="IDX1006"></A>
 
363
<A NAME="IDX1007"></A>
364
364
Align strings to <VAR>number</VAR> bytes (default: 1).
365
365
 
 
366
<DT><SAMP>&lsquo;--endianness=<VAR>byteorder</VAR>&rsquo;</SAMP>
 
367
<DD>
 
368
<A NAME="IDX1008"></A>
 
369
Write out 32-bit numbers in the given byte order.  The possible values are
 
370
<CODE>big</CODE> and <CODE>little</CODE>.  The default depends on the platform, namely
 
371
on the endianness of the CPU.
 
372
 
 
373
MO files of any endianness can be used on any platform.  When a MO file has
 
374
an endianness other than the platform's one, the 32-bit numbers from the MO
 
375
file are swapped at runtime.  The performance impact is negligible.
 
376
 
 
377
This option can be useful to produce MO files that are independent of the
 
378
platform.
 
379
 
366
380
<DT><SAMP>&lsquo;--no-hash&rsquo;</SAMP>
367
381
<DD>
368
 
<A NAME="IDX1001"></A>
 
382
<A NAME="IDX1009"></A>
369
383
Don't include a hash table in the binary file.  Lookup will be more expensive
370
384
at run time (binary search instead of hash table lookup).
371
385
 
381
395
<DD>
382
396
<DT><SAMP>&lsquo;--help&rsquo;</SAMP>
383
397
<DD>
384
 
<A NAME="IDX1002"></A>
385
 
<A NAME="IDX1003"></A>
386
 
Display this help and exit.
387
 
 
388
 
<DT><SAMP>&lsquo;-V&rsquo;</SAMP>
389
 
<DD>
390
 
<DT><SAMP>&lsquo;--version&rsquo;</SAMP>
391
 
<DD>
392
 
<A NAME="IDX1004"></A>
393
 
<A NAME="IDX1005"></A>
394
 
Output version information and exit.
395
 
 
396
 
<DT><SAMP>&lsquo;--statistics&rsquo;</SAMP>
397
 
<DD>
398
 
<A NAME="IDX1006"></A>
399
 
Print statistics about translations.  When the option <CODE>--verbose</CODE> is used
400
 
in combination with <CODE>--statistics</CODE>, the input file name is printed in
401
 
front of the statistics line.
402
 
 
403
 
<DT><SAMP>&lsquo;-v&rsquo;</SAMP>
404
 
<DD>
405
 
<DT><SAMP>&lsquo;--verbose&rsquo;</SAMP>
406
 
<DD>
407
 
<A NAME="IDX1007"></A>
408
 
<A NAME="IDX1008"></A>
409
 
Increase verbosity level.
410
 
 
411
 
</DL>
412
 
 
413
 
 
414
 
 
415
 
<H2><A NAME="SEC168" HREF="gettext_toc.html#TOC168">10.2  Invoking the <CODE>msgunfmt</CODE> Program</A></H2>
416
 
 
417
 
<P>
418
 
<A NAME="IDX1009"></A>
419
398
<A NAME="IDX1010"></A>
420
 
 
421
 
<PRE>
422
 
msgunfmt [<VAR>option</VAR>] [<VAR>file</VAR>]...
423
 
</PRE>
424
 
 
425
 
<P>
426
399
<A NAME="IDX1011"></A>
427
 
The <CODE>msgunfmt</CODE> program converts a binary message catalog to a
428
 
Uniforum style .po file.
429
 
 
430
 
</P>
431
 
 
432
 
 
433
 
<H3><A NAME="SEC169" HREF="gettext_toc.html#TOC169">10.2.1  Operation mode</A></H3>
434
 
 
435
 
<DL COMPACT>
436
 
 
437
 
<DT><SAMP>&lsquo;-j&rsquo;</SAMP>
 
400
Display this help and exit.
 
401
 
 
402
<DT><SAMP>&lsquo;-V&rsquo;</SAMP>
438
403
<DD>
439
 
<DT><SAMP>&lsquo;--java&rsquo;</SAMP>
 
404
<DT><SAMP>&lsquo;--version&rsquo;</SAMP>
440
405
<DD>
441
406
<A NAME="IDX1012"></A>
442
407
<A NAME="IDX1013"></A>
 
408
Output version information and exit.
 
409
 
 
410
<DT><SAMP>&lsquo;--statistics&rsquo;</SAMP>
 
411
<DD>
443
412
<A NAME="IDX1014"></A>
444
 
Java mode: input is a Java <CODE>ResourceBundle</CODE> class.
 
413
Print statistics about translations.  When the option <CODE>--verbose</CODE> is used
 
414
in combination with <CODE>--statistics</CODE>, the input file name is printed in
 
415
front of the statistics line.
445
416
 
446
 
<DT><SAMP>&lsquo;--csharp&rsquo;</SAMP>
 
417
<DT><SAMP>&lsquo;-v&rsquo;</SAMP>
 
418
<DD>
 
419
<DT><SAMP>&lsquo;--verbose&rsquo;</SAMP>
447
420
<DD>
448
421
<A NAME="IDX1015"></A>
449
422
<A NAME="IDX1016"></A>
450
 
C# mode: input is a .NET .dll file containing a subclass of
451
 
<CODE>GettextResourceSet</CODE>.
452
 
 
453
 
<DT><SAMP>&lsquo;--csharp-resources&rsquo;</SAMP>
454
 
<DD>
 
423
Increase verbosity level.
 
424
 
 
425
</DL>
 
426
 
 
427
 
 
428
 
 
429
<H2><A NAME="SEC168" HREF="gettext_toc.html#TOC168">10.2  Invoking the <CODE>msgunfmt</CODE> Program</A></H2>
 
430
 
 
431
<P>
455
432
<A NAME="IDX1017"></A>
456
433
<A NAME="IDX1018"></A>
457
 
C# resources mode: input is a .NET <TT>&lsquo;.resources&rsquo;</TT> file.
458
 
 
459
 
<DT><SAMP>&lsquo;--tcl&rsquo;</SAMP>
460
 
<DD>
 
434
 
 
435
<PRE>
 
436
msgunfmt [<VAR>option</VAR>] [<VAR>file</VAR>]...
 
437
</PRE>
 
438
 
 
439
<P>
461
440
<A NAME="IDX1019"></A>
 
441
The <CODE>msgunfmt</CODE> program converts a binary message catalog to a
 
442
Uniforum style .po file.
 
443
 
 
444
</P>
 
445
 
 
446
 
 
447
<H3><A NAME="SEC169" HREF="gettext_toc.html#TOC169">10.2.1  Operation mode</A></H3>
 
448
 
 
449
<DL COMPACT>
 
450
 
 
451
<DT><SAMP>&lsquo;-j&rsquo;</SAMP>
 
452
<DD>
 
453
<DT><SAMP>&lsquo;--java&rsquo;</SAMP>
 
454
<DD>
462
455
<A NAME="IDX1020"></A>
463
 
Tcl mode: input is a tcl/msgcat <TT>&lsquo;.msg&rsquo;</TT> file.
464
 
 
465
 
</DL>
466
 
 
467
 
 
468
 
 
469
 
<H3><A NAME="SEC170" HREF="gettext_toc.html#TOC170">10.2.2  Input file location</A></H3>
470
 
 
471
 
<DL COMPACT>
472
 
 
473
 
<DT><SAMP>&lsquo;<VAR>file</VAR> ...&rsquo;</SAMP>
474
 
<DD>
475
 
Input .mo files.
476
 
 
477
 
</DL>
478
 
 
479
 
<P>
480
 
If no input <VAR>file</VAR> is given or if it is <SAMP>&lsquo;-&rsquo;</SAMP>, standard input is read.
481
 
 
482
 
</P>
483
 
 
484
 
 
485
 
<H3><A NAME="SEC171" HREF="gettext_toc.html#TOC171">10.2.3  Input file location in Java mode</A></H3>
486
 
 
487
 
<DL COMPACT>
488
 
 
489
 
<DT><SAMP>&lsquo;-r <VAR>resource</VAR>&rsquo;</SAMP>
490
 
<DD>
491
 
<DT><SAMP>&lsquo;--resource=<VAR>resource</VAR>&rsquo;</SAMP>
492
 
<DD>
493
456
<A NAME="IDX1021"></A>
494
457
<A NAME="IDX1022"></A>
495
 
Specify the resource name.
 
458
Java mode: input is a Java <CODE>ResourceBundle</CODE> class.
496
459
 
497
 
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
498
 
<DD>
499
 
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
 
460
<DT><SAMP>&lsquo;--csharp&rsquo;</SAMP>
500
461
<DD>
501
462
<A NAME="IDX1023"></A>
502
463
<A NAME="IDX1024"></A>
503
 
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
504
 
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
505
 
 
506
 
</DL>
507
 
 
508
 
<P>
509
 
The class name is determined by appending the locale name to the resource name,
510
 
separated with an underscore.  The class is located using the <CODE>CLASSPATH</CODE>.
511
 
 
512
 
</P>
513
 
 
514
 
 
515
 
<H3><A NAME="SEC172" HREF="gettext_toc.html#TOC172">10.2.4  Input file location in C# mode</A></H3>
516
 
 
517
 
<DL COMPACT>
518
 
 
519
 
<DT><SAMP>&lsquo;-r <VAR>resource</VAR>&rsquo;</SAMP>
520
 
<DD>
521
 
<DT><SAMP>&lsquo;--resource=<VAR>resource</VAR>&rsquo;</SAMP>
 
464
C# mode: input is a .NET .dll file containing a subclass of
 
465
<CODE>GettextResourceSet</CODE>.
 
466
 
 
467
<DT><SAMP>&lsquo;--csharp-resources&rsquo;</SAMP>
522
468
<DD>
523
469
<A NAME="IDX1025"></A>
524
470
<A NAME="IDX1026"></A>
525
 
Specify the resource name.
 
471
C# resources mode: input is a .NET <TT>&lsquo;.resources&rsquo;</TT> file.
526
472
 
527
 
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
528
 
<DD>
529
 
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
 
473
<DT><SAMP>&lsquo;--tcl&rsquo;</SAMP>
530
474
<DD>
531
475
<A NAME="IDX1027"></A>
532
476
<A NAME="IDX1028"></A>
533
 
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
534
 
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
535
 
 
536
 
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
 
477
Tcl mode: input is a tcl/msgcat <TT>&lsquo;.msg&rsquo;</TT> file.
 
478
 
 
479
</DL>
 
480
 
 
481
 
 
482
 
 
483
<H3><A NAME="SEC170" HREF="gettext_toc.html#TOC170">10.2.2  Input file location</A></H3>
 
484
 
 
485
<DL COMPACT>
 
486
 
 
487
<DT><SAMP>&lsquo;<VAR>file</VAR> ...&rsquo;</SAMP>
 
488
<DD>
 
489
Input .mo files.
 
490
 
 
491
</DL>
 
492
 
 
493
<P>
 
494
If no input <VAR>file</VAR> is given or if it is <SAMP>&lsquo;-&rsquo;</SAMP>, standard input is read.
 
495
 
 
496
</P>
 
497
 
 
498
 
 
499
<H3><A NAME="SEC171" HREF="gettext_toc.html#TOC171">10.2.3  Input file location in Java mode</A></H3>
 
500
 
 
501
<DL COMPACT>
 
502
 
 
503
<DT><SAMP>&lsquo;-r <VAR>resource</VAR>&rsquo;</SAMP>
 
504
<DD>
 
505
<DT><SAMP>&lsquo;--resource=<VAR>resource</VAR>&rsquo;</SAMP>
537
506
<DD>
538
507
<A NAME="IDX1029"></A>
539
 
Specify the base directory for locale dependent <TT>&lsquo;.dll&rsquo;</TT> files.
540
 
 
541
 
</DL>
542
 
 
543
 
<P>
544
 
The <SAMP>&lsquo;-l&rsquo;</SAMP> and <SAMP>&lsquo;-d&rsquo;</SAMP> options are mandatory.  The <TT>&lsquo;.msg&rsquo;</TT> file is
545
 
located in a subdirectory of the specified directory whose name depends on the
546
 
locale.
547
 
 
548
 
</P>
549
 
 
550
 
 
551
 
<H3><A NAME="SEC173" HREF="gettext_toc.html#TOC173">10.2.5  Input file location in Tcl mode</A></H3>
552
 
 
553
 
<DL COMPACT>
554
 
 
555
 
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
556
 
<DD>
557
 
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
558
 
<DD>
559
508
<A NAME="IDX1030"></A>
 
509
Specify the resource name.
 
510
 
 
511
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
 
512
<DD>
 
513
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
 
514
<DD>
560
515
<A NAME="IDX1031"></A>
561
 
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
562
 
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
563
 
 
564
 
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
565
 
<DD>
566
516
<A NAME="IDX1032"></A>
 
517
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
 
518
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
 
519
 
 
520
</DL>
 
521
 
 
522
<P>
 
523
The class name is determined by appending the locale name to the resource name,
 
524
separated with an underscore.  The class is located using the <CODE>CLASSPATH</CODE>.
 
525
 
 
526
</P>
 
527
 
 
528
 
 
529
<H3><A NAME="SEC172" HREF="gettext_toc.html#TOC172">10.2.4  Input file location in C# mode</A></H3>
 
530
 
 
531
<DL COMPACT>
 
532
 
 
533
<DT><SAMP>&lsquo;-r <VAR>resource</VAR>&rsquo;</SAMP>
 
534
<DD>
 
535
<DT><SAMP>&lsquo;--resource=<VAR>resource</VAR>&rsquo;</SAMP>
 
536
<DD>
 
537
<A NAME="IDX1033"></A>
 
538
<A NAME="IDX1034"></A>
 
539
Specify the resource name.
 
540
 
 
541
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
 
542
<DD>
 
543
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
 
544
<DD>
 
545
<A NAME="IDX1035"></A>
 
546
<A NAME="IDX1036"></A>
 
547
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
 
548
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
 
549
 
 
550
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
 
551
<DD>
 
552
<A NAME="IDX1037"></A>
 
553
Specify the base directory for locale dependent <TT>&lsquo;.dll&rsquo;</TT> files.
 
554
 
 
555
</DL>
 
556
 
 
557
<P>
 
558
The <SAMP>&lsquo;-l&rsquo;</SAMP> and <SAMP>&lsquo;-d&rsquo;</SAMP> options are mandatory.  The <TT>&lsquo;.msg&rsquo;</TT> file is
 
559
located in a subdirectory of the specified directory whose name depends on the
 
560
locale.
 
561
 
 
562
</P>
 
563
 
 
564
 
 
565
<H3><A NAME="SEC173" HREF="gettext_toc.html#TOC173">10.2.5  Input file location in Tcl mode</A></H3>
 
566
 
 
567
<DL COMPACT>
 
568
 
 
569
<DT><SAMP>&lsquo;-l <VAR>locale</VAR>&rsquo;</SAMP>
 
570
<DD>
 
571
<DT><SAMP>&lsquo;--locale=<VAR>locale</VAR>&rsquo;</SAMP>
 
572
<DD>
 
573
<A NAME="IDX1038"></A>
 
574
<A NAME="IDX1039"></A>
 
575
Specify the locale name, either a language specification of the form <VAR>ll</VAR>
 
576
or a combined language and country specification of the form <VAR>ll_CC</VAR>.
 
577
 
 
578
<DT><SAMP>&lsquo;-d <VAR>directory</VAR>&rsquo;</SAMP>
 
579
<DD>
 
580
<A NAME="IDX1040"></A>
567
581
Specify the base directory of <TT>&lsquo;.msg&rsquo;</TT> message catalogs.
568
582
 
569
583
</DL>
583
597
<DD>
584
598
<DT><SAMP>&lsquo;--output-file=<VAR>file</VAR>&rsquo;</SAMP>
585
599
<DD>
586
 
<A NAME="IDX1033"></A>
587
 
<A NAME="IDX1034"></A>
 
600
<A NAME="IDX1041"></A>
 
601
<A NAME="IDX1042"></A>
588
602
Write output to specified file.
589
603
 
590
604
</DL>
604
618
<DD>
605
619
<DT><SAMP>&lsquo;--color=<VAR>when</VAR>&rsquo;</SAMP>
606
620
<DD>
607
 
<A NAME="IDX1035"></A>
 
621
<A NAME="IDX1043"></A>
608
622
Specify whether or when to use colors and other text attributes.
609
623
See section <A HREF="gettext_9.html#SEC150">9.11.1  The <CODE>--color</CODE> option</A> for details.
610
624
 
611
625
<DT><SAMP>&lsquo;--style=<VAR>style_file</VAR>&rsquo;</SAMP>
612
626
<DD>
613
 
<A NAME="IDX1036"></A>
 
627
<A NAME="IDX1044"></A>
614
628
Specify the CSS style rule file to use for <CODE>--color</CODE>.
615
629
See section <A HREF="gettext_9.html#SEC152">9.11.3  The <CODE>--style</CODE> option</A> for details.
616
630
 
617
631
<DT><SAMP>&lsquo;--force-po&rsquo;</SAMP>
618
632
<DD>
619
 
<A NAME="IDX1037"></A>
 
633
<A NAME="IDX1045"></A>
620
634
Always write an output file even if it contains no message.
621
635
 
622
636
<DT><SAMP>&lsquo;-i&rsquo;</SAMP>
623
637
<DD>
624
638
<DT><SAMP>&lsquo;--indent&rsquo;</SAMP>
625
639
<DD>
626
 
<A NAME="IDX1038"></A>
627
 
<A NAME="IDX1039"></A>
 
640
<A NAME="IDX1046"></A>
 
641
<A NAME="IDX1047"></A>
628
642
Write the .po file using indented style.
629
643
 
630
644
<DT><SAMP>&lsquo;--strict&rsquo;</SAMP>
631
645
<DD>
632
 
<A NAME="IDX1040"></A>
 
646
<A NAME="IDX1048"></A>
633
647
Write out a strict Uniforum conforming PO file.  Note that this
634
648
Uniforum format should be avoided because it doesn't support the
635
649
GNU extensions.
638
652
<DD>
639
653
<DT><SAMP>&lsquo;--properties-output&rsquo;</SAMP>
640
654
<DD>
641
 
<A NAME="IDX1041"></A>
642
 
<A NAME="IDX1042"></A>
 
655
<A NAME="IDX1049"></A>
 
656
<A NAME="IDX1050"></A>
643
657
Write out a Java ResourceBundle in Java <CODE>.properties</CODE> syntax.  Note
644
658
that this file format doesn't support plural forms and silently drops
645
659
obsolete messages.
646
660
 
647
661
<DT><SAMP>&lsquo;--stringtable-output&rsquo;</SAMP>
648
662
<DD>
649
 
<A NAME="IDX1043"></A>
 
663
<A NAME="IDX1051"></A>
650
664
Write out a NeXTstep/GNUstep localized resource file in <CODE>.strings</CODE> syntax.
651
665
Note that this file format doesn't support plural forms.
652
666
 
654
668
<DD>
655
669
<DT><SAMP>&lsquo;--width=<VAR>number</VAR>&rsquo;</SAMP>
656
670
<DD>
657
 
<A NAME="IDX1044"></A>
658
 
<A NAME="IDX1045"></A>
 
671
<A NAME="IDX1052"></A>
 
672
<A NAME="IDX1053"></A>
659
673
Set the output page width.  Long strings in the output files will be
660
674
split across multiple lines in order to ensure that each line's width
661
675
(= number of screen columns) is less or equal to the given <VAR>number</VAR>.
662
676
 
663
677
<DT><SAMP>&lsquo;--no-wrap&rsquo;</SAMP>
664
678
<DD>
665
 
<A NAME="IDX1046"></A>
 
679
<A NAME="IDX1054"></A>
666
680
Do not break long message lines.  Message lines whose width exceeds the
667
681
output page width will not be split into several lines.  Only file reference
668
682
lines which are wider than the output page width will be split.
671
685
<DD>
672
686
<DT><SAMP>&lsquo;--sort-output&rsquo;</SAMP>
673
687
<DD>
674
 
<A NAME="IDX1047"></A>
675
 
<A NAME="IDX1048"></A>
676
 
<A NAME="IDX1049"></A>
 
688
<A NAME="IDX1055"></A>
 
689
<A NAME="IDX1056"></A>
 
690
<A NAME="IDX1057"></A>
677
691
Generate sorted output.  Note that using this option makes it much harder
678
692
for the translator to understand each message's context.
679
693
 
689
703
<DD>
690
704
<DT><SAMP>&lsquo;--help&rsquo;</SAMP>
691
705
<DD>
692
 
<A NAME="IDX1050"></A>
693
 
<A NAME="IDX1051"></A>
 
706
<A NAME="IDX1058"></A>
 
707
<A NAME="IDX1059"></A>
694
708
Display this help and exit.
695
709
 
696
710
<DT><SAMP>&lsquo;-V&rsquo;</SAMP>
697
711
<DD>
698
712
<DT><SAMP>&lsquo;--version&rsquo;</SAMP>
699
713
<DD>
700
 
<A NAME="IDX1052"></A>
701
 
<A NAME="IDX1053"></A>
 
714
<A NAME="IDX1060"></A>
 
715
<A NAME="IDX1061"></A>
702
716
Output version information and exit.
703
717
 
704
718
<DT><SAMP>&lsquo;-v&rsquo;</SAMP>
705
719
<DD>
706
720
<DT><SAMP>&lsquo;--verbose&rsquo;</SAMP>
707
721
<DD>
708
 
<A NAME="IDX1054"></A>
709
 
<A NAME="IDX1055"></A>
 
722
<A NAME="IDX1062"></A>
 
723
<A NAME="IDX1063"></A>
710
724
Increase verbosity level.
711
725
 
712
726
</DL>
715
729
 
716
730
<H2><A NAME="SEC177" HREF="gettext_toc.html#TOC177">10.3  The Format of GNU MO Files</A></H2>
717
731
<P>
718
 
<A NAME="IDX1056"></A>
719
 
<A NAME="IDX1057"></A>
 
732
<A NAME="IDX1064"></A>
 
733
<A NAME="IDX1065"></A>
720
734
 
721
735
</P>
722
736
<P>
725
739
 
726
740
</P>
727
741
<P>
728
 
<A NAME="IDX1058"></A>
 
742
<A NAME="IDX1066"></A>
729
743
The first two words serve the identification of the file.  The magic
730
744
number will always signal GNU MO files.  The number is stored in the
731
745
byte order of the generating machine, so the magic number really is
785
799
 
786
800
</P>
787
801
<P>
788
 
<A NAME="IDX1059"></A>
 
802
<A NAME="IDX1067"></A>
789
803
The size <VAR>S</VAR> of the hash table can be zero.  In this case, the
790
804
hash table itself is not contained in the MO file.  Some people might
791
805
prefer this because a precomputed hashing table takes disk space, and
806
820
 
807
821
</P>
808
822
<P>
809
 
<A NAME="IDX1060"></A>
 
823
<A NAME="IDX1068"></A>
810
824
Contexts are stored by storing the concatenation of the context, a
811
825
<KBD>EOT</KBD> byte, and the original string, instead of the original string.
812
826
 
813
827
</P>
814
828
<P>
815
 
<A NAME="IDX1061"></A>
 
829
<A NAME="IDX1069"></A>
816
830
Plural forms are stored by letting the plural of the original string
817
831
follow the singular of the original string, separated through a
818
832
<KBD>NUL</KBD> byte.  The length which appears in the string descriptor