Package com.vaadin.flow.spring.i18n
Class DefaultI18NProviderFactory
java.lang.Object
com.vaadin.flow.spring.i18n.DefaultI18NProviderFactory
- All Implemented Interfaces:
Serializable,org.springframework.context.annotation.Condition
public class DefaultI18NProviderFactory
extends Object
implements org.springframework.context.annotation.Condition, Serializable
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 StringDefault location pattern to be used withResourcePatternResolver. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultI18NProviderCreates new instance ofDefaultI18NProviderwith the given location pattern.booleanmatches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
-
Field Details
-
DEFAULT_LOCATION_PATTERN
Default location pattern to be used withResourcePatternResolver.- See Also:
-
-
Constructor Details
-
DefaultI18NProviderFactory
public DefaultI18NProviderFactory()
-
-
Method Details
-
create
Creates new instance ofDefaultI18NProviderwith the given location pattern.- Parameters:
locationPattern- location pattern forResourcePatternResolverto find translation files for available locales.- Returns:
- new instance of
DefaultI18NProvider. May be null. - See Also:
-
ResourcePatternResolverResourcePatternResolver.getResources(String)
-
matches
public boolean matches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata) - Specified by:
matchesin interfaceorg.springframework.context.annotation.Condition
-