Class TranslatableFormattedText
java.lang.Object
velox.gui.utils.localization.translatable.TranslatableFormattedText
- All Implemented Interfaces:
TranslatableComponent
Formats to localized text. Use this class only with skeletons from
Correct usage:
Incorrect usage:
In incorrect case, you should extract this text to the `.property` file and use
MessageFormat.
A format that passed to this class shouldn't contain any punctuation or plain text. Correct usage:
new TranslatableFormattedText("{0, number, :: unit/hour unit-width-full-name}", 1) Incorrect usage:
new TranslatableFormattedText("{0, number, :: unit/hour unit-width-full-name} to complete task", 1) In incorrect case, you should extract this text to the `.property` file and use
TranslatableText-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface velox.gui.utils.localization.translatable.TranslatableComponent
toDefaultString, toLocalizedString
-
Constructor Details
-
TranslatableFormattedText
- Parameters:
format- skeleton fromMessageFormat, accept only positional argumentargs- positional arguments
-
-
Method Details
-
toLocalizedString
- Specified by:
toLocalizedStringin interfaceTranslatableComponent- Parameters:
locale-- Returns:
- localized string in specific locale
-