X-Git-Url: https://git.mdrn.pl/pylucene.git/blobdiff_plain/a2e61f0c04805cfcb8706176758d1283c7e3a55c..aaeed5504b982cf3545252ab528713250aa33eed:/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/messages/package.html?ds=inline diff --git a/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/messages/package.html b/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/messages/package.html deleted file mode 100644 index 24d4171..0000000 --- a/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/messages/package.html +++ /dev/null @@ -1,99 +0,0 @@ - - - -
- - - - -For Native Language Support (NLS), system of software internationalization. - --This utility API, adds support for NLS messages in the apache code. -It is currently used by the lucene "New Flexible Query PArser". -
--Features: -
-Lazy loading of Message Strings - -
- public class MessagesTestBundle extends NLS { - - private static final String BUNDLE_NAME = MessagesTestBundle.class.getName(); - - private MessagesTestBundle() { - // should never be instantiated - } - - static { - // register all string ids with NLS class and initialize static string - // values - NLS.initializeMessages(BUNDLE_NAME, MessagesTestBundle.class); - } - - // static string must match the strings in the property files. - public static String Q0001E_INVALID_SYNTAX; - public static String Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION; - - // this message is missing from the properties file - public static String Q0005E_MESSAGE_NOT_IN_BUNDLE; - } - - // Create a message reference - Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX"); - - // Do other stuff in the code... - // when is time to display the message to the user or log the message on a file - // the message is loaded from the correct bundle - - String message1 = invalidSyntax.getLocalizedMessage(); - String message2 = invalidSyntax.getLocalizedMessage(Locale.JAPANESE); -- - -
-Normal loading of Message Strings - -
- String message1 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION); - String message2 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, Locale.JAPANESE); -- - -
-The org.apache.lucene.messages.TestNLS junit contains several other examples. -The TestNLS java code is available from the Apache Lucene code repository. -
- -