Class TranslatableFormattedText

java.lang.Object
velox.gui.utils.localization.translatable.TranslatableFormattedText
All Implemented Interfaces:
TranslatableComponent

public class TranslatableFormattedText extends Object implements TranslatableComponent
Formats to localized text. Use this class only with skeletons from 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 Details

    • TranslatableFormattedText

      public TranslatableFormattedText(String format, Object... args)
      Parameters:
      format - skeleton from MessageFormat, accept only positional argument
      args - positional arguments
  • Method Details