Package org.apache.guacamole.language
Class TranslatableMessage
java.lang.Object
org.apache.guacamole.language.TranslatableMessage
A message which can be translated using a translation service, providing a
translation key and optional set of values to be substituted into the
translation string associated with that key.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TranslatableMessage associated with the given translation key, without any associated variables.TranslatableMessage
(String key, Object variables) Creates a new TranslatableMessage associated with the given translation key and associated variables. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Returns the arbitrary key which can be used to look up the message to be displayed in the user's native language.Returns an arbitrary object whose properties should be substituted for the corresponding placeholders within the string associated with the key.
-
Constructor Details
-
TranslatableMessage
Creates a new TranslatableMessage associated with the given translation key, without any associated variables.- Parameters:
key
- The translation key to associate with the TranslatableMessage.
-
TranslatableMessage
Creates a new TranslatableMessage associated with the given translation key and associated variables.- Parameters:
key
- The translation key to associate with the TranslatableMessage.variables
- An arbitrary object whose properties should be substituted for the corresponding placeholders within the string associated with the given translation key.
-
-
Method Details
-
getKey
Returns the arbitrary key which can be used to look up the message to be displayed in the user's native language.- Returns:
- The arbitrary key associated with the human-readable message.
-
getVariables
Returns an arbitrary object whose properties should be substituted for the corresponding placeholders within the string associated with the key. If not applicable, null is returned.- Returns:
- An arbitrary object whose properties should be substituted for the corresponding placeholders within the string associated with the key, or null if not applicable.
-