com.vaadin.flow.spring.i18n.
Class DefaultI18NProviderFactory
All Implemented Interfaces:
Serializable
, org.springframework.context.annotation.Condition
Factory for DefaultI18NProvider
. Factory creates I18N provider for
locales based on all .properties files in /vaadin-i18n folder in the
classpath including JAR contents.
See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default location pattern to be used with
ResourcePatternResolver
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultI18NProvider
Creates new instance of
DefaultI18NProvider
with the given location pattern.boolean
matches
(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
-
Field Details
-
DEFAULT_LOCATION_PATTERN
Default location pattern to be used with
ResourcePatternResolver
.See Also:
-
-
Constructor Details
-
DefaultI18NProviderFactory
public DefaultI18NProviderFactory()
-
-
Method Details
-
create
Creates new instance of
DefaultI18NProvider
with the given location pattern.ResourcePatternResolver
ResourcePatternResolver.getResources(String)
Parameters:
locationPattern
- location pattern forResourcePatternResolver
to find translation files for available locales.Returns:
new instance of
DefaultI18NProvider
. May be null.See Also:
-
matches
public boolean matches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata) Specified by:
matches
in interfaceorg.springframework.context.annotation.Condition
-