Interface TranslationResolver
- All Known Implementing Classes:
PropertiesTranslationResolver
public interface TranslationResolver
An interface for resolving translations based on a key and a
Through implementations of the
Please note, that the
Locale.
Through implementations of the
TranslationResolver MVC views shall be able
to receive translations from different, prioritized sources, e.g. properties files or
a database.
Please note, that the
Locale gets resolved by the implementations of the TranslationResolver interface.- Author:
- Tobias Erdle
-
Method Summary
-
Method Details
-
resolve
Resolve the translation for a string key.The
Localemust be resolved by the implementation of this interface.- Parameters:
key- the string key for which translations shall be resolved- Returns:
- the found translation or null, when the key doesn't exist
-
resolve
Resolve 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.- 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
-