- java.lang.Object
-
- org.apache.xml.security.utils.I18n
-
public final class I18n extends Object
The Internationalization (I18N) pack.
-
-
Field Summary
Fields Modifier and Type Field Description static StringNOT_INITIALIZED_MSGField NOT_INITIALIZED_MSG
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetExceptionMessage(String msgID)Method getExceptionMessagestatic StringgetExceptionMessage(String msgID, Exception originalException)Method getExceptionMessagestatic StringgetExceptionMessage(String msgID, Object[] exArgs)Method getExceptionMessagestatic voidinit(String languageCode, String countryCode)Method initstatic voidinit(ResourceBundle resourceBundle)Method initstatic Stringtranslate(String message)Method translate translates a message ID into an internationalized String, see alsoXMLSecurityException.getExceptionMessage()static Stringtranslate(String message, Object[] args)Method translate translates a message ID into an internationalized String, see alsoXMLSecurityException.getExceptionMEssage().
-
-
-
Field Detail
-
NOT_INITIALIZED_MSG
public static final String NOT_INITIALIZED_MSG
Field NOT_INITIALIZED_MSG- See Also:
- Constant Field Values
-
-
Method Detail
-
translate
public static String translate(String message, Object[] args)
Method translate translates a message ID into an internationalized String, see alsoXMLSecurityException.getExceptionMEssage(). The strings are stored in theResourceBundle, which is identified inexceptionMessagesResourceBundleBase- Parameters:
message-args- is anObject[]array of strings which are inserted into the String which is retrieved from theResouceBundle- Returns:
- message translated
-
translate
public static String translate(String message)
Method translate translates a message ID into an internationalized String, see alsoXMLSecurityException.getExceptionMessage()- Parameters:
message-- Returns:
- message translated
-
getExceptionMessage
public static String getExceptionMessage(String msgID)
Method getExceptionMessage- Parameters:
msgID-- Returns:
- message translated
-
getExceptionMessage
public static String getExceptionMessage(String msgID, Exception originalException)
Method getExceptionMessage- Parameters:
msgID-originalException-- Returns:
- message translated
-
getExceptionMessage
public static String getExceptionMessage(String msgID, Object[] exArgs)
Method getExceptionMessage- Parameters:
msgID-exArgs-- Returns:
- message translated
-
init
public static void init(String languageCode, String countryCode)
Method init- Parameters:
languageCode-countryCode-
-
init
public static void init(ResourceBundle resourceBundle)
Method init- Parameters:
resourceBundle-
-
-