Class DefaultTranslationResolverFactory
java.lang.Object
de.chkal.mvctoolbox.core.translation.DefaultTranslationResolverFactory
Factory for initializing the default translation resolver for the
Toolbox.- Author:
- Tobias Erdle
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultTranslationResolver(jakarta.mvc.MvcContext mvcContext) Produce the defaultTranslationResolverfor theToolbox.
-
Constructor Details
-
DefaultTranslationResolverFactory
public DefaultTranslationResolverFactory()
-
-
Method Details
-
getDefaultTranslationResolver
@Produces @ApplicationScoped public TranslationResolver getDefaultTranslationResolver(jakarta.mvc.MvcContext mvcContext) Produce the defaultTranslationResolverfor theToolbox. This will be an @ApplicationScopedPropertiesTranslationResolverwhich points at a resource bundle named 'messages' in the projects resources root. This will match for the most applications.In case an application needs a more advanced setup or custom
TranslationResolvers, an additional factory with producer methods can be created.- Parameters:
mvcContext- theMvcContextof the current request- Returns:
- the default
PropertiesTranslationResolverfor theToolboxbean
-