Class I18n


  • public class I18n
    extends java.lang.Object
    The Internationalization (I18N) pack.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static boolean alreadyInitialized
      Field alreadyInitialized
      static java.lang.String NOT_INITIALIZED_MSG
      Field NOT_INITIALIZED_MSG
      private static java.util.ResourceBundle resourceBundle
      Field resourceBundle
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private I18n()
      Constructor I18n
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getExceptionMessage​(java.lang.String msgID)
      Method getExceptionMessage
      static java.lang.String getExceptionMessage​(java.lang.String msgID, java.lang.Exception originalException)
      Method getExceptionMessage
      static java.lang.String getExceptionMessage​(java.lang.String msgID, java.lang.Object[] exArgs)
      Method getExceptionMessage
      static void init​(java.lang.String languageCode, java.lang.String countryCode)
      Method init
      static void init​(java.util.ResourceBundle resourceBundle)
      Method init
      static java.lang.String translate​(java.lang.String message)
      Method translate translates a message ID into an internationalized String, see also XMLSecurityException.getExceptionMessage()
      static java.lang.String translate​(java.lang.String message, java.lang.Object[] args)
      Method translate translates a message ID into an internationalized String, see alse XMLSecurityException.getExceptionMEssage().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NOT_INITIALIZED_MSG

        public static final java.lang.String NOT_INITIALIZED_MSG
        Field NOT_INITIALIZED_MSG
        See Also:
        Constant Field Values
      • resourceBundle

        private static java.util.ResourceBundle resourceBundle
        Field resourceBundle
      • alreadyInitialized

        private static boolean alreadyInitialized
        Field alreadyInitialized
    • Constructor Detail

      • I18n

        private I18n()
        Constructor I18n
    • Method Detail

      • translate

        public static java.lang.String translate​(java.lang.String message,
                                                 java.lang.Object[] args)
        Method translate translates a message ID into an internationalized String, see alse XMLSecurityException.getExceptionMEssage(). The strings are stored in the ResourceBundle, which is identified in exceptionMessagesResourceBundleBase
        Parameters:
        message -
        args - is an Object[] array of strings which are inserted into the String which is retrieved from the ResouceBundle
        Returns:
        message translated
      • translate

        public static java.lang.String translate​(java.lang.String message)
        Method translate translates a message ID into an internationalized String, see also XMLSecurityException.getExceptionMessage()
        Parameters:
        message -
        Returns:
        message translated
      • getExceptionMessage

        public static java.lang.String getExceptionMessage​(java.lang.String msgID)
        Method getExceptionMessage
        Parameters:
        msgID -
        Returns:
        message translated
      • getExceptionMessage

        public static java.lang.String getExceptionMessage​(java.lang.String msgID,
                                                           java.lang.Exception originalException)
        Method getExceptionMessage
        Parameters:
        msgID -
        originalException -
        Returns:
        message translated
      • getExceptionMessage

        public static java.lang.String getExceptionMessage​(java.lang.String msgID,
                                                           java.lang.Object[] exArgs)
        Method getExceptionMessage
        Parameters:
        msgID -
        exArgs -
        Returns:
        message translated
      • init

        public static void init​(java.lang.String languageCode,
                                java.lang.String countryCode)
        Method init
        Parameters:
        languageCode -
        countryCode -
      • init

        public static void init​(java.util.ResourceBundle resourceBundle)
        Method init
        Parameters:
        resourceBundle -