Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-runtime / intl-csharp / csharpdoc / GNU_Gettext_GettextResourceSet.html
1 <HTML>
2 <HEAD>
3 <TITLE>GNU.Gettext.GettextResourceSet Class</TITLE>
4 </HEAD>
5 <BODY BGCOLOR="#FFFFFF">
6 <H3>GNU.Gettext.GettextResourceSet Class</H3>
7
8 <BLOCKQUOTE>
9 <TABLE COLS="1" ROWS="1" WIDTH="100%">
10 <TR><TD BGCOLOR="#C0C0C0"><PRE>public class GettextResourceSet: System.Resources.ResourceSet</PRE></TD></TR>
11 </TABLE>
12 </BLOCKQUOTE>
13
14 <H4>Base Types</H4>
15
16 <BLOCKQUOTE>
17 System.Resources.ResourceSet<BR>
18 &nbsp;&nbsp;GettextResourceSet<P>
19
20 </BLOCKQUOTE>
21
22 <H4>Library</H4>
23
24 <BLOCKQUOTE>
25 GNU.Gettext
26 </BLOCKQUOTE>
27
28 <H4>Summary</H4>
29
30 <BLOCKQUOTE>
31
32 Each instance of this class encapsulates a single PO file.
33 <P>
34
35
36 This API of this class is not meant to be used directly; use
37 <CODE>GettextResourceManager</CODE> instead.
38 <P>
39
40 </BLOCKQUOTE>
41
42 <H4>See Also</H4>
43
44 <BLOCKQUOTE>
45 <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
46 </BLOCKQUOTE>
47
48 <H4>Members</H4>
49
50 <BLOCKQUOTE>
51 <P>
52
53 GettextResourceSet Constructors<P>
54
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>
59 <P>
60
61 GettextResourceSet Methods<P>
62
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>
67 <P>
68
69 GettextResourceSet Properties<P>
70
71 <A HREF="#GettextResourceSet.Keys%20Property" TARGET="contents">GettextResourceSet.Keys Property</A><BR>
72 </BLOCKQUOTE>
73
74 <HR>
75
76 <A NAME="GettextResourceSet%28%29%20Constructor"><H3>GettextResourceSet() Constructor</H3>
77
78 <BLOCKQUOTE>
79 <TABLE COLS="1" ROWS="1" WIDTH="100%">
80 <TR><TD BGCOLOR="#C0C0C0"><PRE>protected GettextResourceSet();</PRE></TD></TR>
81 </TABLE>
82 </BLOCKQUOTE>
83
84 <H4>Summary</H4>
85
86 <BLOCKQUOTE>
87
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.
93 </BLOCKQUOTE>
94
95 <H4>See Also</H4>
96
97 <BLOCKQUOTE>
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>
99 </BLOCKQUOTE>
100
101 <HR>
102
103 <A NAME="GettextResourceSet%28System.Resources.IResourceReader%29%20Constructor"><H3>GettextResourceSet(System.Resources.IResourceReader) Constructor</H3>
104
105 <BLOCKQUOTE>
106 <TABLE COLS="1" ROWS="1" WIDTH="100%">
107 <TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceSet(System.Resources.IResourceReader reader);</PRE></TD></TR>
108 </TABLE>
109 </BLOCKQUOTE>
110
111 <H4>Summary</H4>
112
113 <BLOCKQUOTE>
114
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.
119 </BLOCKQUOTE>
120
121 <H4>See Also</H4>
122
123 <BLOCKQUOTE>
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>
125 </BLOCKQUOTE>
126
127 <HR>
128
129 <A NAME="GettextResourceSet%28System.IO.Stream%29%20Constructor"><H3>GettextResourceSet(System.IO.Stream) Constructor</H3>
130
131 <BLOCKQUOTE>
132 <TABLE COLS="1" ROWS="1" WIDTH="100%">
133 <TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceSet(System.IO.Stream stream);</PRE></TD></TR>
134 </TABLE>
135 </BLOCKQUOTE>
136
137 <H4>Summary</H4>
138
139 <BLOCKQUOTE>
140
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
144 forms.
145 </BLOCKQUOTE>
146
147 <H4>See Also</H4>
148
149 <BLOCKQUOTE>
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>
151 </BLOCKQUOTE>
152
153 <HR>
154
155 <A NAME="GettextResourceSet%28System.String%29%20Constructor"><H3>GettextResourceSet(System.String) Constructor</H3>
156
157 <BLOCKQUOTE>
158 <TABLE COLS="1" ROWS="1" WIDTH="100%">
159 <TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceSet(System.String fileName);</PRE></TD></TR>
160 </TABLE>
161 </BLOCKQUOTE>
162
163 <H4>Summary</H4>
164
165 <BLOCKQUOTE>
166
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.
171 </BLOCKQUOTE>
172
173 <H4>See Also</H4>
174
175 <BLOCKQUOTE>
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>
177 </BLOCKQUOTE>
178
179 <HR>
180
181 <A NAME="GettextResourceSet.GetPluralString%20Method"><H3>GettextResourceSet.GetPluralString Method</H3>
182
183 <BLOCKQUOTE>
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>
186 </TABLE>
187 </BLOCKQUOTE>
188
189 <H4>Summary</H4>
190
191 <BLOCKQUOTE>
192
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>.
196 </BLOCKQUOTE>
197
198 <H4>Parameters</H4>
199
200 <BLOCKQUOTE>
201 <DL>
202 <DT>msgid</DT>
203 <DD>the key string to be translated, an ASCII
204                     string</DD>
205 <DT>msgidPlural</DT>
206 <DD>the English plural of <I>msgid</I>,
207                           an ASCII string</DD>
208 <DT>n</DT>
209 <DD>the number, should be &gt;= 0</DD>
210 </DL>
211 </BLOCKQUOTE>
212
213 <H4>Return Value</H4>
214
215 <BLOCKQUOTE>
216 the translation, or <CODE>null</CODE> if none is found
217 </BLOCKQUOTE>
218
219 <H4>See Also</H4>
220
221 <BLOCKQUOTE>
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>
223 </BLOCKQUOTE>
224
225 <HR>
226
227 <A NAME="GettextResourceSet.GetString%28System.String%29%20Method"><H3>GettextResourceSet.GetString(System.String) Method</H3>
228
229 <BLOCKQUOTE>
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>
232 </TABLE>
233 </BLOCKQUOTE>
234
235 <H4>Summary</H4>
236
237 <BLOCKQUOTE>
238
239 Returns the translation of <I>msgid</I>.
240 </BLOCKQUOTE>
241
242 <H4>Parameters</H4>
243
244 <BLOCKQUOTE>
245 <DL>
246 <DT>msgid</DT>
247 <DD>the key string to be translated, an ASCII
248                     string</DD>
249 </DL>
250 </BLOCKQUOTE>
251
252 <H4>Return Value</H4>
253
254 <BLOCKQUOTE>
255 the translation of <I>msgid</I>, or <CODE>null</CODE> if
256          none is found
257 </BLOCKQUOTE>
258
259 <H4>See Also</H4>
260
261 <BLOCKQUOTE>
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>
263 </BLOCKQUOTE>
264
265 <HR>
266
267 <A NAME="GettextResourceSet.GetString%28System.String%2C%20bool%29%20Method"><H3>GettextResourceSet.GetString(System.String, bool) Method</H3>
268
269 <BLOCKQUOTE>
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>
272 </TABLE>
273 </BLOCKQUOTE>
274
275 <H4>Summary</H4>
276
277 <BLOCKQUOTE>
278
279 Returns the translation of <I>msgid</I>, with possibly
280 case-insensitive lookup.
281 </BLOCKQUOTE>
282
283 <H4>Parameters</H4>
284
285 <BLOCKQUOTE>
286 <DL>
287 <DT>msgid</DT>
288 <DD>the key string to be translated, an ASCII
289                     string</DD>
290 </DL>
291 </BLOCKQUOTE>
292
293 <H4>Return Value</H4>
294
295 <BLOCKQUOTE>
296 the translation of <I>msgid</I>, or <CODE>null</CODE> if
297          none is found
298 </BLOCKQUOTE>
299
300 <H4>See Also</H4>
301
302 <BLOCKQUOTE>
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>
304 </BLOCKQUOTE>
305
306 <HR>
307
308 <A NAME="GettextResourceSet.PluralEval%20Method"><H3>GettextResourceSet.PluralEval Method</H3>
309
310 <BLOCKQUOTE>
311 <TABLE COLS="1" ROWS="1" WIDTH="100%">
312 <TR><TD BGCOLOR="#C0C0C0"><PRE>protected virtual long PluralEval(long n);</PRE></TD></TR>
313 </TABLE>
314 </BLOCKQUOTE>
315
316 <H4>Summary</H4>
317
318 <BLOCKQUOTE>
319
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.
323 </BLOCKQUOTE>
324
325 <H4>See Also</H4>
326
327 <BLOCKQUOTE>
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>
329 </BLOCKQUOTE>
330
331 <HR>
332
333 <A NAME="GettextResourceSet.Keys%20Property"><H3>GettextResourceSet.Keys Property</H3>
334
335 <BLOCKQUOTE>
336 <TABLE COLS="1" ROWS="1" WIDTH="100%">
337 <TR><TD BGCOLOR="#C0C0C0"><PRE>public virtual System.Collections.ICollection Keys { get; }</PRE></TD></TR>
338 </TABLE>
339 </BLOCKQUOTE>
340
341 <H4>Summary</H4>
342
343 <BLOCKQUOTE>
344
345 Returns the keys of this resource set, i.e. the strings for which
346 <CODE>GetObject()</CODE> can return a non-null value.
347 </BLOCKQUOTE>
348
349 <H4>See Also</H4>
350
351 <BLOCKQUOTE>
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>
353 </BLOCKQUOTE>
354
355 </BODY>
356 </HTML>