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 voidchangeLocale(Locale locale) Updates the internal usedResourceBundlefor the givenLocale.static StringgetLocalizedMessage(String message) Checks whether the given message starts with a % sign.static StringReturns the translation for the given key according to the current setLocale.static StringReturns 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 usesMessageFormatto 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
Localewith 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
nullin 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 usedResourceBundlefor the givenLocale.- Parameters:
locale- TheLocalethat should be used by NatTable internally.- Since:
- 1.4
-