public static interface LocalizationContext.Builder
LocalizationContext
creationLocalizationContext.Builder withInitialLocale(Locale locale)
locale
- LocaleLocalizationContext.Builder withInitialLocalization(Localization localization)
localization
- LocalizationLocalizationContext.Builder withInitialSystemLocale()
LocalizationContext.Builder withDefaultBooleanLocalization(boolean value, Localizable message)
Localizable
message to use to localize a boolean valuevalue
- Boolean valuemessage
- The localizable message to use to localize given boolean valueLocalizationContext.Builder withDefaultDateTemporalFormat(TemporalFormat format)
TemporalFormat
style to use to format dates.
This is overriden by any Localization.getDefaultDateTemporalFormat()
value.
format
- Defalt date format styleLocalizationContext.Builder withDefaultTimeTemporalFormat(TemporalFormat format)
TemporalFormat
style to use to format times.
This is overriden by any Localization.getDefaultTimeTemporalFormat()
value.
format
- Defalt time format styleLocalizationContext.Builder disableDateTimeFormatsCache()
LocalizationContext.Builder messageArgumentsPlaceholder(String placeholder)
MessageProvider.DEFAULT_MESSAGE_ARGUMENT_PLACEHOLDER
.placeholder
- Placeholder for message argumentsLocalizationContext.Builder withMessageProvider(MessageProvider messageProvider)
MessageProvider
for messages localization.messageProvider
- The MessageProvider to add@Deprecated default LocalizationContext.Builder messageProvider(MessageProvider messageProvider)
withMessageProvider(MessageProvider)
messageProvider
- MessageProvider to addLocalizationContext.Builder withLocalizationChangeListener(LocalizationContext.LocalizationChangeListener listener)
LocalizationContext.LocalizationChangeListener
to listen for localization changes.listener
- The listener to add (not null)LocalizationContext.Builder withMissingMessageLocalizationListener(LocalizationContext.MissingMessageLocalizationListener listener)
LocalizationContext.MissingMessageLocalizationListener
to be notified when a message localization is not provided
by any of the MessageProvider
s registered in the LocalizationContext
.listener
- The listener to add (not null)LocalizationContext build()
Copyright © 2019 The Holon Platform. All rights reserved.