Class PropertiesTranslationResolver
java.lang.Object
de.chkal.mvctoolbox.core.translation.PropertiesTranslationResolver
- All Implemented Interfaces:
TranslationResolver
Resolves translations from a resource bundle with a configurable base name. The
Locale for the
processed request will be resolved by the applied MvcContext.- Author:
- Tobias Erdle
-
Constructor Summary
ConstructorsConstructorDescriptionPropertiesTranslationResolver(String resourceBundleName, jakarta.mvc.MvcContext mvcContext) -
Method Summary
-
Constructor Details
-
PropertiesTranslationResolver
-
-
Method Details
-
resolve
Description copied from interface:TranslationResolverResolve the translation for a string key.The
Localemust be resolved by the implementation of this interface.- Specified by:
resolvein interfaceTranslationResolver- Parameters:
key- the string key for which translations shall be resolved- Returns:
- the found translation or null, when the key doesn't exist
-
resolve
Description copied from interface:TranslationResolverResolve the translation for a string key. The translation may be aMessageFormattemplate which can be enriched with custom arguments.The
Localemust be resolved by the implementation of this interface.- Specified by:
resolvein interfaceTranslationResolver- Parameters:
key- the string key for which translations shall be resolvedargs- an array of variable length containing placeholder values- Returns:
- the found translation with filled placeholders or null, when the key doesn't exist
-