com.holonplatform.core.i18n

## Interface LocalizationContext.Builder

- Enclosing interface:
    LocalizationContext

      public static interface LocalizationContext.Builder

  Builder for `LocalizationContext` creation

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `LocalizationContext` | `build()` Build LocalizationContext instance
    `LocalizationContext.Builder` | `disableDateTimeFormatsCache()` Disable caching of date/time formatters
    `LocalizationContext.Builder` | `messageArgumentsPlaceholder(String placeholder)` Set localized message arguments placehoder.
    `LocalizationContext.Builder` | `messageProvider(MessageProvider messageProvider)` Add a MessageProvider for messages localization
    `LocalizationContext.Builder` | `withDefaultBooleanLocalization(boolean value, Localizable message)` Sets the default `Localizable` message to use to localize a boolean value
    `LocalizationContext.Builder` | `withDefaultDateTemporalFormat(TemporalFormat format)` Set the default `TemporalFormat` style to use to format dates.
    `LocalizationContext.Builder` | `withDefaultTimeTemporalFormat(TemporalFormat format)` Set the default `TemporalFormat` style to use to format times.
    `LocalizationContext.Builder` | `withInitialLocale(Locale locale)` Initialize context with given Locale
    `LocalizationContext.Builder` | `withInitialLocalization(Localization localization)` Initialize context with given Localization
    `LocalizationContext.Builder` | `withInitialSystemLocale()` Initialize context with current system default Locale

- - ### Method Detail

    - #### withInitialLocale

          LocalizationContext.Builder withInitialLocale(Locale locale)

      Initialize context with given Locale
      Parameters:
        `locale` - Locale
      Returns:
        this

    - #### withInitialLocalization

          LocalizationContext.Builder withInitialLocalization(Localization localization)

      Initialize context with given Localization
      Parameters:
        `localization` - Localization
      Returns:
        this

    - #### withInitialSystemLocale

          LocalizationContext.Builder withInitialSystemLocale()

      Initialize context with current system default Locale
      Returns:
        this

    - #### withDefaultBooleanLocalization

          LocalizationContext.Builder withDefaultBooleanLocalization(boolean value,
                                                                     Localizable message)

      Sets the default `Localizable` message to use to localize a boolean value
      Parameters:
        `value` - Boolean value
        `message` - The localizable message to use to localize given boolean value
      Returns:
        this

    - #### withDefaultDateTemporalFormat

          LocalizationContext.Builder withDefaultDateTemporalFormat(TemporalFormat format)

      Set the default `TemporalFormat` style to use to format dates.

      This is overriden by any `Localization.getDefaultDateTemporalFormat()` value.

      Parameters:
        `format` - Defalt date format style
      Returns:
        this

    - #### withDefaultTimeTemporalFormat

          LocalizationContext.Builder withDefaultTimeTemporalFormat(TemporalFormat format)

      Set the default `TemporalFormat` style to use to format times.

      This is overriden by any `Localization.getDefaultTimeTemporalFormat()` value.

      Parameters:
        `format` - Defalt time format style
      Returns:
        this

    - #### disableDateTimeFormatsCache

          LocalizationContext.Builder disableDateTimeFormatsCache()

      Disable caching of date/time formatters
      Returns:
        this

    - #### messageArgumentsPlaceholder

          LocalizationContext.Builder messageArgumentsPlaceholder(String placeholder)

      Set localized message arguments placehoder. Default is `MessageProvider.DEFAULT_MESSAGE_ARGUMENT_PLACEHOLDER`.
      Parameters:
        `placeholder` - Placeholder for message arguments
      Returns:
        this

    - #### messageProvider

          LocalizationContext.Builder messageProvider(MessageProvider messageProvider)

      Add a MessageProvider for messages localization
      Parameters:
        `messageProvider` - MessageProvider to add
      Returns:
        this

    - #### build

          LocalizationContext build()

      Build LocalizationContext instance
      Returns:
        LocalizationContext

Copyright © 2017 The Holon Platform. All rights reserved.