Package org.apache.uima.internal.util
Class I18nUtil
- java.lang.Object
-
- org.apache.uima.internal.util.I18nUtil
-
public class I18nUtil extends Object
Internationaliation utilities.
-
-
Constructor Summary
Constructors Constructor Description I18nUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
localizeMessage(String aResourceBundleName, String aMessageKey, Object[] aArguments)
Localize a message to the default Locale.static String
localizeMessage(String aResourceBundleName, String aMessageKey, Object[] aArguments, ClassLoader aLoader)
Localize a message to the default Locale.static String
localizeMessage(String aResourceBundleName, Locale aLocale, String aMessageKey, Object[] aArguments)
Localize a message to a specified Locale.static String
localizeMessage(String aResourceBundleName, Locale aLocale, String aMessageKey, Object[] aArguments, ClassLoader aLoader)
Localize a message to a specified Locale.static void
removeTccl()
static void
setTccl(ClassLoader tccl)
-
-
-
Method Detail
-
localizeMessage
public static String localizeMessage(String aResourceBundleName, String aMessageKey, 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 String localizeMessage(String aResourceBundleName, String aMessageKey, Object[] aArguments, 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 loasedI18nUtil
is used.- Returns:
- localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.
-
localizeMessage
public static String localizeMessage(String aResourceBundleName, Locale aLocale, String aMessageKey, 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 String localizeMessage(String aResourceBundleName, Locale aLocale, String aMessageKey, Object[] aArguments, 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 loasedI18nUtil
is used.- Returns:
- localized message. If an exception occurs, returns "MESSAGE LOCALIZATION FAILED:" followed by the exception message.
-
setTccl
public static void setTccl(ClassLoader tccl)
-
removeTccl
public static void removeTccl()
-
-