Class I18nText

java.lang.Object
com.persequor.extension.frontend.I18nText
All Implemented Interfaces:
IString

public class I18nText extends Object implements IString
  • Method Details

    • of

      public static I18nText of(String text, String... tokens)
      In order to support translations when this is added in a future version of saga, add the variable part of your text as replacement tokens. Example: I18nText.of("{{1}} {{2}} ran across the {{3}}", "500", "elephants", "savanna"); produces 500 elephants ran across the savanna
      Parameters:
      text - Text to be shown
      tokens - tokens to replace into the text/translated text
      Returns:
      Object representing translatable text
    • of

      public static I18nText of(String text)
      Parameters:
      text - to appear as a translated string
      Returns:
      Object representing translatable text
    • getText

      public String getText()
      Specified by:
      getText in interface IString
    • getTokens

      public List<String> getTokens()
      Specified by:
      getTokens in interface IString
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getType

      public StringType getType()
      Specified by:
      getType in interface IString