public interface Translation
ResourceBundle
Some translations require parameters to be sent together with them, if they're not given they will be filled with empty text.
While the client has multiple locales available, server-side vanilla
translations usually support only NamedLocales.AMERICAN_ENGLISH
.
Modifier and Type | Method and Description |
---|---|
default String |
get()
Gets the default translation without extra parameters.
|
String |
get(Locale locale)
Gets the translation without any parameters replaced.
|
String |
get(Locale locale,
Object... args)
Gets the translation format with the specified parameters.
|
default String |
get(Object... args)
Gets the default translation format with the specified parameters.
|
String |
getId()
Gets the identifier for this
Translation . |
String getId()
Translation
.default String get()
default String get(Object... args)
args
- The parameters for this translationString get(Locale locale)
locale
- The language to get the translated format string for