## org.apache.lucene.messages
Class NLS

    java.lang.Object
      org.apache.lucene.messages.NLS

    public class NLS

extends java.lang.Object

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.

Constructor Summary
`protected` `NLS()`

Method Summary
`static java.lang.String` `getLocalizedMessage(java.lang.String key)`
`static java.lang.String` `getLocalizedMessage(java.lang.String key, java.util.Locale locale)`
`static java.lang.String` `getLocalizedMessage(java.lang.String key, java.util.Locale locale, java.lang.Object[] args)`
`static java.lang.String` `getLocalizedMessage(java.lang.String key, java.lang.Object[] args)`
`protected static void` `initializeMessages(java.lang.String bundleName, java.lang.Class clazz)` 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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NLS

    protected NLS()

Method Detail

### getLocalizedMessage

    public static java.lang.String getLocalizedMessage(java.lang.String key)

### getLocalizedMessage

    public static java.lang.String getLocalizedMessage(java.lang.String key,
                                                       java.util.Locale locale)

### getLocalizedMessage

    public static java.lang.String getLocalizedMessage(java.lang.String key,
                                                       java.util.Locale locale,
                                                       java.lang.Object[] args)

### getLocalizedMessage

    public static java.lang.String getLocalizedMessage(java.lang.String key,
                                                       java.lang.Object[] args)

### initializeMessages

    protected static void initializeMessages(java.lang.String bundleName,
                                             java.lang.Class clazz)

  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.

  Parameters:
    `bundleName` - Property file with that contains the message bundle
    `clazz` - where constants will reside

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.