3 <TITLE>GNU.Gettext.GettextResourceSet Class
</TITLE>
5 <BODY BGCOLOR=
"#FFFFFF">
6 <H3>GNU.Gettext.GettextResourceSet Class
</H3>
9 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
10 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public class GettextResourceSet: System.Resources.ResourceSet
</PRE></TD></TR>
17 System.Resources.ResourceSet
<BR>
18 GettextResourceSet
<P>
32 Each instance of this class encapsulates a single PO file.
36 This API of this class is not meant to be used directly; use
37 <CODE>GettextResourceManager
</CODE> instead.
45 <A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
53 GettextResourceSet Constructors
<P>
55 <A HREF=
"#GettextResourceSet%28%29%20Constructor" TARGET=
"contents">GettextResourceSet() Constructor
</A><BR>
56 <A HREF=
"#GettextResourceSet%28System.Resources.IResourceReader%29%20Constructor" TARGET=
"contents">GettextResourceSet(System.Resources.IResourceReader) Constructor
</A><BR>
57 <A HREF=
"#GettextResourceSet%28System.IO.Stream%29%20Constructor" TARGET=
"contents">GettextResourceSet(System.IO.Stream) Constructor
</A><BR>
58 <A HREF=
"#GettextResourceSet%28System.String%29%20Constructor" TARGET=
"contents">GettextResourceSet(System.String) Constructor
</A><BR>
61 GettextResourceSet Methods
<P>
63 <A HREF=
"#GettextResourceSet.GetPluralString%20Method" TARGET=
"contents">GettextResourceSet.GetPluralString Method
</A><BR>
64 <A HREF=
"#GettextResourceSet.GetString%28System.String%29%20Method" TARGET=
"contents">GettextResourceSet.GetString(System.String) Method
</A><BR>
65 <A HREF=
"#GettextResourceSet.GetString%28System.String%2C%20bool%29%20Method" TARGET=
"contents">GettextResourceSet.GetString(System.String, bool) Method
</A><BR>
66 <A HREF=
"#GettextResourceSet.PluralEval%20Method" TARGET=
"contents">GettextResourceSet.PluralEval Method
</A><BR>
69 GettextResourceSet Properties
<P>
71 <A HREF=
"#GettextResourceSet.Keys%20Property" TARGET=
"contents">GettextResourceSet.Keys Property
</A><BR>
76 <A NAME=
"GettextResourceSet%28%29%20Constructor"><H3>GettextResourceSet() Constructor
</H3>
79 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
80 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>protected GettextResourceSet();
</PRE></TD></TR>
88 Creates a new message catalog. When using this constructor, you
89 must override the
<CODE>ReadResources
</CODE> method, in order to initialize
90 the
<CODE>Table
</CODE> property. The message catalog will support plural
91 forms only if the
<CODE>ReadResources
</CODE> method installs values of type
92 <CODE>String[]
</CODE> and if the
<CODE>PluralEval
</CODE> method is overridden.
98 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
103 <A NAME=
"GettextResourceSet%28System.Resources.IResourceReader%29%20Constructor"><H3>GettextResourceSet(System.Resources.IResourceReader) Constructor
</H3>
106 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
107 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public GettextResourceSet(System.Resources.IResourceReader reader);
</PRE></TD></TR>
115 Creates a new message catalog, by reading the string/value pairs from
116 the given
<I>reader
</I>. The message catalog will support
117 plural forms only if the reader can produce values of type
118 <CODE>String[]
</CODE> and if the
<CODE>PluralEval
</CODE> method is overridden.
124 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
129 <A NAME=
"GettextResourceSet%28System.IO.Stream%29%20Constructor"><H3>GettextResourceSet(System.IO.Stream) Constructor
</H3>
132 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
133 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public GettextResourceSet(System.IO.Stream stream);
</PRE></TD></TR>
141 Creates a new message catalog, by reading the string/value pairs from
142 the given
<I>stream
</I>, which should have the format of
143 a
<CODE>.resources
</CODE> file. The message catalog will not support plural
150 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
155 <A NAME=
"GettextResourceSet%28System.String%29%20Constructor"><H3>GettextResourceSet(System.String) Constructor
</H3>
158 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
159 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public GettextResourceSet(System.String fileName);
</PRE></TD></TR>
167 Creates a new message catalog, by reading the string/value pairs from
168 the file with the given
<I>fileName
</I>. The file should
169 be in the format of a
<CODE>.resources
</CODE> file. The message catalog will
170 not support plural forms.
176 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
181 <A NAME=
"GettextResourceSet.GetPluralString%20Method"><H3>GettextResourceSet.GetPluralString Method
</H3>
184 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
185 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public virtual System.String GetPluralString(System.String msgid, System.String msgidPlural, long n);
</PRE></TD></TR>
193 Returns the translation of
<I>msgid
</I> and
194 <I>msgidPlural
</I>, choosing the right plural form
195 depending on the number
<I>n
</I>.
203 <DD>the key string to be translated, an ASCII
206 <DD>the English plural of
<I>msgid
</I>,
209 <DD>the number, should be
>=
0</DD>
213 <H4>Return Value
</H4>
216 the translation, or
<CODE>null
</CODE> if none is found
222 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
227 <A NAME=
"GettextResourceSet.GetString%28System.String%29%20Method"><H3>GettextResourceSet.GetString(System.String) Method
</H3>
230 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
231 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public override System.String GetString(System.String msgid);
</PRE></TD></TR>
239 Returns the translation of
<I>msgid
</I>.
247 <DD>the key string to be translated, an ASCII
252 <H4>Return Value
</H4>
255 the translation of
<I>msgid
</I>, or
<CODE>null
</CODE> if
262 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
267 <A NAME=
"GettextResourceSet.GetString%28System.String%2C%20bool%29%20Method"><H3>GettextResourceSet.GetString(System.String, bool) Method
</H3>
270 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
271 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public override System.String GetString(System.String msgid, bool ignoreCase);
</PRE></TD></TR>
279 Returns the translation of
<I>msgid
</I>, with possibly
280 case-insensitive lookup.
288 <DD>the key string to be translated, an ASCII
293 <H4>Return Value
</H4>
296 the translation of
<I>msgid
</I>, or
<CODE>null
</CODE> if
303 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
308 <A NAME=
"GettextResourceSet.PluralEval%20Method"><H3>GettextResourceSet.PluralEval Method
</H3>
311 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
312 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>protected virtual long PluralEval(long n);
</PRE></TD></TR>
320 Returns the index of the plural form to be chosen for a given number.
321 The default implementation is the Germanic plural formula:
322 zero for
<I>n
</I> ==
1, one for
<I>n
</I> !=
1.
328 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>
333 <A NAME=
"GettextResourceSet.Keys%20Property"><H3>GettextResourceSet.Keys Property
</H3>
336 <TABLE COLS=
"1" ROWS=
"1" WIDTH=
"100%">
337 <TR><TD BGCOLOR=
"#C0C0C0"><PRE>public virtual System.Collections.ICollection Keys { get; }
</PRE></TD></TR>
345 Returns the keys of this resource set, i.e. the strings for which
346 <CODE>GetObject()
</CODE> can return a non-null value.
352 <A HREF=
"GNU_Gettext_GettextResourceSet.html" TARGET=
"contents">GNU.Gettext.GettextResourceSet Class
</A>,
<A HREF=
"GNU_Gettext.html" TARGET=
"members">GNU.Gettext Namespace
</A>