public abstract class BundleBase extends Object implements NlsMessageProvider
| Constructor and Description |
|---|
BundleBase() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
findMessage(Locale loc,
String code)
Locate the specified key for the specified locale.
|
String |
formatMessage(Locale loc,
String key,
Object... param)
Gets the string, and applies default message formatting using the parameters
passed in the specified locale.
|
String |
formatMessage(String key,
Object... param)
Gets the string, and applies default message formatting using the parameters
passed in the current locale.
|
String |
getString(Locale loc,
String key)
Returns a translation of key in the specified locale (or the one
closest to it).
|
String |
getString(String key)
Returns the translation of the key passed in the current client
locale.
|
@Nullable public abstract String findMessage(@Nonnull Locale loc, @Nonnull String code)
NlsMessageProviderfindMessage in interface NlsMessageProvider@Nonnull public String getString(@Nonnull Locale loc, @Nonnull String key)
loc - key - ResourceNotFoundException - the bundle cannot be located.@Nonnull public String getString(@Nonnull String key)
key - @Nonnull public String formatMessage(@Nonnull String key, @Nonnull Object... param)
key - param - Copyright © 2017 etc.to. All rights reserved.