Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / man / resgen.1
1 .\" 
2 .\" resgen manual page.
3 .\" (C) 2007 Novell, Inc. 
4 .\" Author:
5 .\"   Miguel de Icaza (miguel@gnu.org)
6 .\"
7 .de Sp \" Vertical space (when we can't use .PP)
8 .if t .sp .5v
9 .if n .sp
10 ..
11 .TH Mono "resgen"
12 .SH NAME
13 resgen, resgen2 \- Mono/CLI Resource Generator
14 .SH SYNOPSIS
15 .PP
16 .B resgen source.ext [dest.ext] 
17 .PP
18 .B resgen /compile source.ext[,dest.resources] [...]
19 .PP
20 .B resgen2 
21 .SH DESCRIPTION
22 Convert a resource file from one format to another.
23 .PP
24 The currently supported formats are text, resources, resx and po.
25 .TP
26 .I .txt, .text
27 .Sp
28 Used to process text files, the format of the text file is of the
29 form:
30 .nf
31
32         key=value
33
34 .fi
35 The value argument can contain special characters as long as they are
36 escaped.   The escape sequences currently supported are \\n, \\r, \\t,
37 \\\\ (to get the escape sequence itself) and with resgen2 unicode
38 escape sequences are supported with the \\uXXXX escape sequence, where
39 XXXX is a four digit number. 
40 .Sp
41 Lines that start with the # or ; character are considered comments and
42 ignored.
43 .TP
44 .I '.resources'
45 .Sp
46 This is the binary file format implemented by the
47 \fISystem.Resources.ResourceReader\fR class, part of mscorlib.dll
48 .TP
49 .I '.resx'
50 .Sp
51 This is the binary file format implemented by the
52 \fISystem.Resources.ResXResourceReader\fR class.  This class is not
53 part of mscorlib.dll, this class is part of System.Windows.Forms.
54 .TP
55 .I '.po'.
56 .Sp
57 PO files are the source files used by the Unix gettext infrastructure
58 that is typically used to internationalize applications.
59 .Sp
60 Lines starting with the '#' character are comment lines. 
61 .Sp
62 The file contains many instance of strings like this:
63 .nf
64
65      msgid KEY
66      msgstr VALUE
67
68 .fi
69 The KEY is typically the string to translate and the VALUE is the
70 translation.  On PO files instead of using codes as the KEY (as it is
71 customary with resource files) the KEY is typically a complete english
72 message that applications embed in their source code and will be used
73 as a fallback if no translation resources are used.
74 .Sp
75 Since resources are key value pairs, the extended features in PO files
76 are not supported (plurals and support for N-cases).  
77 .Sp
78 To learn more about the po file format, use your info browser and
79 point it to the "(gettext)PO Files" node.
80 .PP
81 If the destination file is not specified, source.resources will be
82 used.
83 .PP
84 The /compile option takes a list of .resX or .txt files to convert to
85 .resources files in one bulk operation, replacing .ext with .resources for
86 the output file name.
87 .SH OPTIONS
88 .TP
89 .I "-compile"
90 .Sp
91 This switch instructs \fIresgen\fR to compile multiple files.  It must
92 appear before any resources are specified on the command line.
93 .TP
94 .I "-usesourcepath"
95 .Sp
96 This option is only available for \fIresgen2\fR, and it instructs resgen to
97 resolve relative paths using the directory of the resx file as current
98 directory.
99 .SH FILES
100 This program will load referenced assemblies from the Mono assembly
101 cache. 
102 .SH MAILING LISTS
103 Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
104 .SH WEB SITE
105 Visit: http://www.mono-project.com for details
106 .SH SEE ALSO
107 .BR mcs(1), mono(1), mono-config(5).
108
109