public class ResourceBundleTranslationProvider extends Object implements TranslationProvider
Constructor and Description |
---|
ResourceBundleTranslationProvider(ResourceBundle bundle) |
Modifier and Type | Method and Description |
---|---|
String |
applyPlaceholders(String raw,
Object... placeholders)
Applied placeholders to the given raw message.
|
@Nullable String |
get(String key)
Returns a message of a single line.
|
@Nullable List<String> |
getList(String key)
Returns a message of one or more lines.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getList
public ResourceBundleTranslationProvider(ResourceBundle bundle)
public @Nullable String get(String key)
TranslationProvider
get
in interface TranslationProvider
key
- the key of the requested messagepublic @Nullable List<String> getList(String key)
TranslationProvider
getList
in interface TranslationProvider
key
- the key of the requested messagepublic String applyPlaceholders(String raw, Object... placeholders)
TranslationProvider
applyPlaceholders
in interface TranslationProvider
raw
- the raw message to processplaceholders
- placeholders to use