org.apache.uima.internal.util
Class I18nUtil

java.lang.Object
  extended by org.apache.uima.internal.util.I18nUtil

public class I18nUtil
extends java.lang.Object

Internationaliation utilities.


Constructor Summary
I18nUtil()
           
 
Method Summary
static java.lang.String localizeMessage(java.lang.String aResourceBundleName, java.util.Locale aLocale, java.lang.String aMessageKey, java.lang.Object[] aArguments)
          Localize a message to a specified Locale.
static java.lang.String localizeMessage(java.lang.String aResourceBundleName, java.util.Locale aLocale, java.lang.String aMessageKey, java.lang.Object[] aArguments, java.lang.ClassLoader aLoader)
          Localize a message to a specified Locale.
static java.lang.String localizeMessage(java.lang.String aResourceBundleName, java.lang.String aMessageKey, java.lang.Object[] aArguments)
          Localize a message to the default Locale.
static java.lang.String localizeMessage(java.lang.String aResourceBundleName, java.lang.String aMessageKey, java.lang.Object[] aArguments, java.lang.ClassLoader aLoader)
          Localize a message to the default Locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nUtil

public I18nUtil()
Method Detail

localizeMessage

public static java.lang.String localizeMessage(java.lang.String aResourceBundleName,
                                               java.lang.String aMessageKey,
                                               java.lang.Object[] aArguments)
Localize a message to the default Locale.

Parameters:
aResourceBundleName - base name of resource bundle
aMessageKey - key of message to localize
aArguments - arguments to message (may be null if none)
Returns:
localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.

localizeMessage

public static java.lang.String localizeMessage(java.lang.String aResourceBundleName,
                                               java.lang.String aMessageKey,
                                               java.lang.Object[] aArguments,
                                               java.lang.ClassLoader aLoader)
Localize a message to the default Locale.

Parameters:
aResourceBundleName - base name of resource bundle
aMessageKey - key of message to localize
aArguments - arguments to message (may be null if none)
aLoader - ClassLoader to use to load the resource bundle. If null, the ClassLoader that loased I18nUtil is used.
Returns:
localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.

localizeMessage

public static java.lang.String localizeMessage(java.lang.String aResourceBundleName,
                                               java.util.Locale aLocale,
                                               java.lang.String aMessageKey,
                                               java.lang.Object[] aArguments)
Localize a message to a specified Locale.

Parameters:
aResourceBundleName - base name of resource bundle
aLocale - locale to which to localize
aMessageKey - key of message to localize
aArguments - arguments to message (may be null if none)
Returns:
localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.

localizeMessage

public static java.lang.String localizeMessage(java.lang.String aResourceBundleName,
                                               java.util.Locale aLocale,
                                               java.lang.String aMessageKey,
                                               java.lang.Object[] aArguments,
                                               java.lang.ClassLoader aLoader)
Localize a message to a specified Locale.

Parameters:
aResourceBundleName - base name of resource bundle
aLocale - locale to which to localize
aMessageKey - key of message to localize
aArguments - arguments to message (may be null if none)
aLoader - ClassLoader to use to load the resource bundle. If null, the ClassLoader that loased I18nUtil is used.
Returns:
localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.


Copyright © 2011. All Rights Reserved.