Package org.apache.uima.internal.util
Class I18nUtil
- java.lang.Object
-
- org.apache.uima.internal.util.I18nUtil
-
public class I18nUtil extends java.lang.ObjectInternationaliation utilities.
-
-
Constructor Summary
Constructors Constructor Description I18nUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringlocalizeMessage(java.lang.String aResourceBundleName, java.lang.String aMessageKey, java.lang.Object[] aArguments)Localize a message to the default Locale.static java.lang.StringlocalizeMessage(java.lang.String aResourceBundleName, java.lang.String aMessageKey, java.lang.Object[] aArguments, java.lang.ClassLoader aLoader)Localize a message to the default Locale.static java.lang.StringlocalizeMessage(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.StringlocalizeMessage(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 voidremoveTccl()static voidsetTccl(java.lang.ClassLoader tccl)
-
-
-
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 bundleaMessageKey- key of message to localizeaArguments- 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 bundleaMessageKey- key of message to localizeaArguments- arguments to message (may be null if none)aLoader- ClassLoader to use to load the resource bundle. If null, the ClassLoader that loasedI18nUtilis 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 bundleaLocale- locale to which to localizeaMessageKey- key of message to localizeaArguments- 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 bundleaLocale- locale to which to localizeaMessageKey- key of message to localizeaArguments- arguments to message (may be null if none)aLoader- ClassLoader to use to load the resource bundle. If null, the ClassLoader that loasedI18nUtilis used.- Returns:
- localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.
-
setTccl
public static void setTccl(java.lang.ClassLoader tccl)
-
removeTccl
public static void removeTccl()
-
-