Documentation of 'org.clapper.util.misc.BundleUtil' Java class
BundleUtil
org.clapper.util.misc

Class BundleUtil



  • public final class BundleUtil
    extends java.lang.Object
    ResourceBundle utilities to aid in localization.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getMessage(java.lang.String bundleName, java.util.Locale locale, java.lang.String key, java.lang.Object[] params)
      Get a localized message from the bundle.
      static java.lang.String getMessage(java.lang.String bundleName, java.util.Locale locale, java.lang.String key, java.lang.String defaultMsg)
      Get a localized message from a bundle.
      static java.lang.String getMessage(java.lang.String bundleName, java.util.Locale locale, java.lang.String key, java.lang.String defaultMsg, java.lang.Object[] params)
      Get a localized message from the bundle.
      static java.lang.String getMessage(java.lang.String bundleName, java.lang.String key, java.lang.Object[] params)
      Get a message from the bundle using the default locale.
      static java.lang.String getString(java.lang.String bundleName, java.lang.String key)
      Get a string from a bundle, using the default locale.
      static java.lang.String getString(java.lang.String bundleName, java.lang.String key, java.lang.String defaultMsg)
      Get a string from a bundle, using the default locale.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getString

        public static java.lang.String getString(java.lang.String bundleName,
                                                 java.lang.String key)
        Get a string from a bundle, using the default locale.
        Parameters:
        bundleName - the bundle name
        key - the key to look up
        Returns:
        the value for the key, or the default value
      • getString

        public static java.lang.String getString(java.lang.String bundleName,
                                                 java.lang.String key,
                                                 java.lang.String defaultMsg)
        Get a string from a bundle, using the default locale.
        Parameters:
        bundleName - the bundle name
        key - the key to look up
        defaultMsg - the default value, or null
        Returns:
        the value for the key, or the default value
      • getMessage

        public static java.lang.String getMessage(java.lang.String bundleName,
                                                  java.util.Locale locale,
                                                  java.lang.String key,
                                                  java.lang.String defaultMsg)
        Get a localized message from a bundle.
        Parameters:
        bundleName - the name of the resource bundle
        locale - the locale
        key - the key
        defaultMsg - the default message
        Returns:
        the message, or the default
      • getMessage

        public static java.lang.String getMessage(java.lang.String bundleName,
                                                  java.lang.String key,
                                                  java.lang.Object[] params)
        Get a message from the bundle using the default locale.
        Parameters:
        bundleName - the name of the resource bundle
        key - the key
        params - parameters for the message
        Returns:
        the message, or the default
      • getMessage

        public static java.lang.String getMessage(java.lang.String bundleName,
                                                  java.util.Locale locale,
                                                  java.lang.String key,
                                                  java.lang.String defaultMsg,
                                                  java.lang.Object[] params)
        Get a localized message from the bundle.
        Parameters:
        bundleName - the name of the resource bundle
        locale - the locale
        key - the key
        defaultMsg - the default message
        params - parameters for the message
        Returns:
        the message, or the default
      • getMessage

        public static java.lang.String getMessage(java.lang.String bundleName,
                                                  java.util.Locale locale,
                                                  java.lang.String key,
                                                  java.lang.Object[] params)
        Get a localized message from the bundle.
        Parameters:
        bundleName - the name of the resource bundle
        locale - the locale
        key - the key
        params - parameters for the message
        Returns:
        the message, or the default

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.