Class Messages
java.lang.Object
org.eclipse.nebula.widgets.nattable.Messages
Class that is used to get the NatTable internal localized messages.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
changeLocale
(Locale locale) Updates the internal usedResourceBundle
for the givenLocale
.static String
getLocalizedMessage
(String message) Checks whether the given message starts with a % sign.static String
Returns the translation for the given key according to the current setLocale
.static String
Returns the translation for the given key according to the current setLocale
.
-
Method Details
-
getString
Returns the translation for the given key according to the current setLocale
.- Parameters:
key
- The NatTable internal translation key.- Returns:
- The localized String for the given key and the current set
Locale
.
-
getString
Returns the translation for the given key according to the current setLocale
. It usesMessageFormat
to replace placeholders with the given parameter values.- Parameters:
key
- The NatTable internal translation key.args
- The parameters that should be used to replace placeholders.- Returns:
- The localized String for the given key and the current set
Locale
with replaced placeholders.
-
getLocalizedMessage
Checks whether the given message starts with a % sign. If it starts with a percentage sign, the message is treated as properties key and it is tried to retrieve the localization. Otherwise the given message is returned.This method returns
null
in case the given message parameter isnull
.- Parameters:
message
- The message for which the localized version is requested- Returns:
- The localized message if the given value starts with % or the given value itself
- Since:
- 1.4
-
changeLocale
Updates the internal usedResourceBundle
for the givenLocale
.- Parameters:
locale
- TheLocale
that should be used by NatTable internally.- Since:
- 1.4
-