Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (103 sloc) 3.08 KB
.\" resgen manual page.
.\" (C) 2007 Novell, Inc.
.\" Author:
.\" Miguel de Icaza (
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
.TH resgen "resgen 1.0"
resgen, resgen2 \- Mono/CLI Resource Generator
.B resgen source.ext [dest.ext]
.B resgen /compile source.ext[,dest.resources] [...]
.B resgen2
Convert a resource file from one format to another.
The currently supported formats are text, resources, resx and po.
.I .txt, .text
Used to process text files, the format of the text file is of the
The value argument can contain special characters as long as they are
escaped. The escape sequences currently supported are \\n, \\r, \\t,
\\\\ (to get the escape sequence itself) and with resgen2 unicode
escape sequences are supported with the \\uXXXX escape sequence, where
XXXX is a four digit number.
Lines that start with the # or ; character are considered comments and
.I '.resources'
This is the binary file format implemented by the
\fISystem.Resources.ResourceReader\fR class, part of mscorlib.dll
.I '.resx'
This is the binary file format implemented by the
\fISystem.Resources.ResXResourceReader\fR class. This class is not
part of mscorlib.dll, this class is part of System.Windows.Forms.
.I '.po'.
PO files are the source files used by the Unix gettext infrastructure
that is typically used to internationalize applications.
Lines starting with the '#' character are comment lines.
The file contains many instance of strings like this:
msgid KEY
msgstr VALUE
The KEY is typically the string to translate and the VALUE is the
translation. On PO files instead of using codes as the KEY (as it is
customary with resource files) the KEY is typically a complete english
message that applications embed in their source code and will be used
as a fallback if no translation resources are used.
Since resources are key value pairs, the extended features in PO files
are not supported (plurals and support for N-cases).
To learn more about the po file format, use your info browser and
point it to the "(gettext)PO Files" node.
If the destination file is not specified, source.resources will be
The /compile option takes a list of .resX or .txt files to convert to
.resources files in one bulk operation, replacing .ext with .resources for
the output file name.
.I "-compile"
This switch instructs \fIresgen\fR to compile multiple files. It must
appear before any resources are specified on the command line.
.I "-usesourcepath"
This option is only available for \fIresgen2\fR, and it instructs resgen to
resolve relative paths using the directory of the resx file as current
This program will load referenced assemblies from the Mono assembly
Visit for details.
Visit: for details
.BR mcs(1), mono(1), mono-config(5).
Something went wrong with that request. Please try again.