Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hyperion.css.i18n
Class CSSI18nUtility

    java.lang.Object
      |
      +--com.hyperion.css.i18n.CSSI18nUtility

public class CSSI18nUtility
extends java.lang.Object

Contains utility methods to enable internationalization.

Since:
  CSSv2.0

Constructor Summary
`CSSI18nUtility()`

Method Summary
`static java.util.ResourceBundle` | `getBundle(java.lang.String bundleName, java.util.Locale locale)` Gets the resource bundle for the bundle name passed in.
`static java.util.ResourceBundle` | `getBundle(java.lang.String bundleName, java.util.Map context)` Gets the resource bundle for the bundle name passed in.
`static java.util.Locale` | `getLocale(java.util.Map context)` Gets the locale that is passed in the `context` argument.
`static java.lang.String` | `getTranslation(java.util.ResourceBundle bundle, java.lang.String key, java.lang.String defaultMessage)` A method for retrieving translations from the resource bundle.
`static java.lang.String` | `getTranslation(java.util.ResourceBundle bundle, java.lang.String key, java.lang.String[] lookups, java.lang.String defaultMessage)` Returns contextually specific translations.
`static java.lang.StringBuffer` | `getTranslationInBuffer(java.util.ResourceBundle bundle, java.lang.String key, java.lang.String defaultMessage)` A method for retrieving translations from the resource bundle.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CSSI18nUtility

    public CSSI18nUtility()

Method Detail

### getTranslation

    public static java.lang.String getTranslation(java.util.ResourceBundle bundle,
                                                  java.lang.String key,
                                                  java.lang.String defaultMessage)
                                           throws CSSIllegalArgumentException

  A method for retrieving translations from the resource bundle.

  Throws:
    `CSSIllegalArgumentException`

### getTranslationInBuffer

    public static java.lang.StringBuffer getTranslationInBuffer(java.util.ResourceBundle bundle,
                                                                java.lang.String key,
                                                                java.lang.String defaultMessage)
                                                         throws CSSIllegalArgumentException

  A method for retrieving translations from the resource bundle.

  Throws:
    `CSSIllegalArgumentException`

### getTranslation

    public static java.lang.String getTranslation(java.util.ResourceBundle bundle,
                                                  java.lang.String key,
                                                  java.lang.String[] lookups,
                                                  java.lang.String defaultMessage)
                                           throws CSSIllegalArgumentException

  Returns contextually specific translations.

  Throws:
    `CSSIllegalArgumentException`

### getLocale

    public static java.util.Locale getLocale(java.util.Map context)
                                      throws CSSIllegalArgumentException

  Gets the locale that is passed in the `context` argument. If there is none passed in then the default locale is returned.

  Parameters:
    `context` - Map structure holding key-value information about the locale.
  Returns:
    Locale
  Throws:
    `CSSIllegalArgumentException`

### getBundle

    public static java.util.ResourceBundle getBundle(java.lang.String bundleName,
                                                     java.util.Locale locale)
                                              throws CSSIllegalArgumentException

  Gets the resource bundle for the bundle name passed in.

  Parameters:
    `bundleName` - Name of the resource bundle.
    `locale` - Geographical or cultural locale object defined in java.util.Locale.
  Returns:
    ResourceBundle
  Throws:
    `CSSIllegalArgumentException`

### getBundle

    public static java.util.ResourceBundle getBundle(java.lang.String bundleName,
                                                     java.util.Map context)
                                              throws CSSIllegalArgumentException

  Gets the resource bundle for the bundle name passed in.

  Parameters:
    `bundleName` - Name of the resource bundle.
    `context` - Map structure holding key-value information about the locale.
  Returns:
    ResourceBundle for the given bundle name
  Throws:
    `CSSIllegalArgumentException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright 2004 Hyperion Solutions Corporation. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD