Class NLS
MessageBundles classes extend this class, to implement a bundle.
For Native Language Support (NLS), system of software internationalization.
This interface is similar to the NLS class in eclipse.osgi.util.NLS class -
initializeMessages() method resets the values of all static strings, should
only be called by classes that extend from NLS (see TestMessages.java for
reference) - performs validation of all message in a bundle, at class load
time - performs per message validation at runtime - see NLSTest.java for
usage reference
MessageBundle classes may subclass this type.
Inheritance
System.Object
NLS
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.QueryParser.dll
Syntax
Constructors
|
Improve this Doc
View Source
NLS()
Declaration
Methods
|
Improve this Doc
View Source
GetLocalizedMessage(String)
Declaration
public static string GetLocalizedMessage(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetLocalizedMessage(String, CultureInfo)
Declaration
public static string GetLocalizedMessage(string key, CultureInfo locale)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Globalization.CultureInfo |
locale |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetLocalizedMessage(String, CultureInfo, Object[])
Declaration
public static string GetLocalizedMessage(string key, CultureInfo locale, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Globalization.CultureInfo |
locale |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetLocalizedMessage(String, Object[])
Declaration
public static string GetLocalizedMessage(string key, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetResourceManagerFactory()
Gets the static Lucene.Net.Util.IResourceManagerFactory instance responsible
for creating System.Resources.ResourceManager instances in this class. LUCENENET specific.
Declaration
public static IResourceManagerFactory GetResourceManagerFactory()
Returns
Type |
Description |
Lucene.Net.Util.IResourceManagerFactory |
|
|
Improve this Doc
View Source
InitializeMessages(String, Type)
Initialize a given class with the message bundle Keys Should be called from
a class that extends NLS in a static block at class load time.
Declaration
protected static void InitializeMessages(string bundleName, Type clazz)
Parameters
Type |
Name |
Description |
System.String |
bundleName |
Property file with that contains the message bundle
|
System.Type |
clazz |
where constants will reside
|
|
Improve this Doc
View Source
SetResourceManagerFactory(IResourceManagerFactory)
Sets the Lucene.Net.Util.IResourceManagerFactory used to create instances of System.Resources.ResourceManager
for retrieving localized resources. Defaults to BundleResourceManagerFactory if not set. LUCENENET specific.
Declaration
public static void SetResourceManagerFactory(IResourceManagerFactory resourceManagerFactory)
Parameters
Type |
Name |
Description |
Lucene.Net.Util.IResourceManagerFactory |
resourceManagerFactory |
The Lucene.Net.Util.IResourceManagerFactory instance. Cannot be null .
|