@Configuration @ConditionalOnClass(value=Navigator.class) @AutoConfigureAfter(value=com.vaadin.flow.spring.SpringBootAutoConfiguration.class) public class LocalizationContextAutoConfiguration extends Object
LocalizationContext integration with the Vaadin session
and UI localization support. The auto-configuration strategy implemented by this class is the following:
1. If a LocalizationContext type bean is available in context, and its scope is either vaadin-ui
or session/"vaadin-session", a post processor is configured to listener to context
localization changes and reflect the changed context Locale to the current UI or Vaadin Session, according to
the LocalizationContext bean scope. This feature can be disabled using the application configuration property
holon.vaadin.localization-context.reflect-locale=false.
2. If a LocalizationContext type bean is available in context, and its scope is either vaadin-ui
or session/"vaadin-session", an initializer is bound to the Vaadin Session or UI
initialization event, according to the LocalizationContext bean scope, to set the initial Session/UI
Locale as LocalizationContext localization. This feature can be disabled using the application
configuration property holon.vaadin.localization-context.auto-init=false.
3. If a LocalizationContext type bean is available in context, and I18NProvider bean type is not
already defined, a Vaadin I18NProvider bean type is registered, using the current LocalizationContext
to provide the messages localization. See LocalizationContextI18NProvider. This feature can be disabled using
the application configuration property holon.vaadin.localization-context.i18nprovider=false.
Copyright © 2019 The Holon Platform. All rights reserved.