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 String
Default location pattern to be used withResourcePatternResolver
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultI18NProvider
Creates new instance ofDefaultI18NProvider
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 withResourcePatternResolver
.- See Also:
-
-
Constructor Details
-
DefaultI18NProviderFactory
public DefaultI18NProviderFactory()
-
-
Method Details
-
create
Creates new instance ofDefaultI18NProvider
with the given location pattern.- Parameters:
locationPattern
- location pattern forResourcePatternResolver
to find translation files for available locales.- Returns:
- new instance of
DefaultI18NProvider
. May be null. - See Also:
-
ResourcePatternResolver
ResourcePatternResolver.getResources(String)
-
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
-