public class GettextResourceSet: System.Resources.ResourceSet
System.Resources.ResourceSet
GettextResourceSet
GNU.Gettext
Each instance of this class encapsulates a single PO file.This API of this class is not meant to be used directly; use
GettextResourceManagerinstead.
GNU.Gettext Namespace
GettextResourceSet Constructors
GettextResourceSet() Constructor
GettextResourceSet(System.Resources.IResourceReader) Constructor
GettextResourceSet(System.IO.Stream) Constructor
GettextResourceSet(System.String) Constructor
GettextResourceSet Methods
GettextResourceSet.GetPluralString Method
GettextResourceSet.GetString(System.String) Method
GettextResourceSet.GetString(System.String, bool) Method
GettextResourceSet.PluralEval Method
GettextResourceSet Properties
protected GettextResourceSet();
Creates a new message catalog. When using this constructor, you must override theReadResourcesmethod, in order to initialize theTableproperty. The message catalog will support plural forms only if theReadResourcesmethod installs values of typeString[]and if thePluralEvalmethod is overridden.
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public GettextResourceSet(System.Resources.IResourceReader reader);
Creates a new message catalog, by reading the string/value pairs from the given reader. The message catalog will support plural forms only if the reader can produce values of typeString[]and if thePluralEvalmethod is overridden.
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public GettextResourceSet(System.IO.Stream stream);
Creates a new message catalog, by reading the string/value pairs from
the given stream, which should have the format of
a .resources file. The message catalog will not support plural
forms.
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public GettextResourceSet(System.String fileName);
Creates a new message catalog, by reading the string/value pairs from
the file with the given fileName. The file should
be in the format of a .resources file. The message catalog will
not support plural forms.
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public virtual System.String GetPluralString(System.String msgid, System.String msgidPlural, long n);
Returns the translation of msgid and msgidPlural, choosing the right plural form depending on the number n.
- msgid
- the key string to be translated, an ASCII string
- msgidPlural
- the English plural of msgid, an ASCII string
- n
- the number, should be >= 0
the translation, or null if none is found
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public override System.String GetString(System.String msgid);
Returns the translation of msgid.
- msgid
- the key string to be translated, an ASCII string
the translation of msgid, or null if
none is found
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public override System.String GetString(System.String msgid, bool ignoreCase);
Returns the translation of msgid, with possibly case-insensitive lookup.
- msgid
- the key string to be translated, an ASCII string
the translation of msgid, or null if
none is found
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
protected virtual long PluralEval(long n);
Returns the index of the plural form to be chosen for a given number. The default implementation is the Germanic plural formula: zero for n == 1, one for n != 1.
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace
public virtual System.Collections.ICollection Keys { get; }
Returns the keys of this resource set, i.e. the strings for which
GetObject() can return a non-null value.
GNU.Gettext.GettextResourceSet Class, GNU.Gettext Namespace