org.apache.xml.security.utils
Class I18n

java.lang.Object
  |
  +--org.apache.xml.security.utils.I18n

public class I18n
extends java.lang.Object

The Internationalization (I18N) pack.

Author:
Christian Geuer-Pollmann

Field Summary
protected static java.lang.String _countryCode
          Field _countryCode
protected static java.lang.String _languageCode
          Field _languageCode
protected static boolean alreadyInitialized
          Field alreadyInitialized
static java.lang.String defaultCountryCode
          Field defaultCountryCode
static java.lang.String defaultLanguageCode
          Field defaultLanguageCode
static java.lang.String NOT_INITIALIZED_MSG
          Field NOT_INITIALIZED_MSG
protected static java.util.ResourceBundle resourceBundle
          Field resourceBundle
 
Method Summary
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 _defaultLanguageCode, java.lang.String _defaultCountryCode)
          Method init
static void initLocale(java.lang.String languageCode, java.lang.String countryCode)
          Method initLocale
static java.lang.String translate(java.lang.String message)
          Method translate translates a message ID into an internationalized String, see alse 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

defaultLanguageCode

public static java.lang.String defaultLanguageCode
Field defaultLanguageCode


defaultCountryCode

public static java.lang.String defaultCountryCode
Field defaultCountryCode


resourceBundle

protected static java.util.ResourceBundle resourceBundle
Field resourceBundle


alreadyInitialized

protected static boolean alreadyInitialized
Field alreadyInitialized


_languageCode

protected static java.lang.String _languageCode
Field _languageCode


_countryCode

protected static java.lang.String _countryCode
Field _countryCode

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

translate

public static java.lang.String translate(java.lang.String message)
Method translate translates a message ID into an internationalized String, see alse XMLSecurityException.getExceptionMEssage()

Parameters:
message -

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.String msgID)
Method getExceptionMessage

Parameters:
msgID -

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.String msgID,
                                                   java.lang.Exception originalException)
Method getExceptionMessage

Parameters:
msgID -
originalException -

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.String msgID,
                                                   java.lang.Object[] exArgs)
Method getExceptionMessage

Parameters:
msgID -
exArgs -

init

public static void init(java.lang.String _defaultLanguageCode,
                        java.lang.String _defaultCountryCode)
Method init

Parameters:
_defaultLanguageCode -
_defaultCountryCode -

initLocale

public static void initLocale(java.lang.String languageCode,
                              java.lang.String countryCode)
Method initLocale

Parameters:
languageCode -
countryCode -