Class AiMessageInputI18n

java.lang.Object
io.jmix.aichat.component.messageinput.AiMessageInputI18n
All Implemented Interfaces:
Serializable

public class AiMessageInputI18n extends Object implements Serializable
The internationalization properties for AiMessageInput. This can be used to customize and translate the language used in the message input component.
See Also:
  • Constructor Details

    • AiMessageInputI18n

      public AiMessageInputI18n()
  • Method Details

    • fromMessages

      public static AiMessageInputI18n fromMessages(Messages messages)
      Creates an instance with all fields resolved from the message bundle (aiMessageInput.i18n.*).
      Parameters:
      messages - the messages bean
      Returns:
      a new localized instance
    • getPlaceholder

      public @Nullable String getPlaceholder()
      Gets the placeholder text and accessible name (aria-label) for the textarea.
      Returns:
      the placeholder, or null
    • setPlaceholder

      public AiMessageInputI18n setPlaceholder(@Nullable String placeholder)
      Sets the placeholder text and accessible name (aria-label) for the textarea.

      This value is applied as both the visible placeholder hint inside the textarea and its aria-label, so it serves as the control's accessible name for screen readers.

      Parameters:
      placeholder - the placeholder text, or null to fall back to the client-side default ("Message")
      Returns:
      this instance for method chaining
    • getSend

      public @Nullable String getSend()
      Gets the translated word for send.
      Returns:
      the translated word for send
    • setSend

      public AiMessageInputI18n setSend(@Nullable String send)
      Sets the translated word for send.

      This word is used as the text content of the button for submitting new messages.

      Parameters:
      send - the translated word for send
      Returns:
      this instance for method chaining
    • getStop

      public @Nullable String getStop()
      Gets the translated word for stop.
      Returns:
      the translated word for stop
    • setStop

      public AiMessageInputI18n setStop(@Nullable String stop)
      Sets the translated word for stop.

      This word is used as the accessible label / tooltip of the send button while it is showing the stop affordance during generation.

      Parameters:
      stop - the translated word for stop
      Returns:
      this instance for method chaining
    • getAttach

      public @Nullable String getAttach()
      Gets the accessible name (aria-label) for the attach (paperclip) button.
      Returns:
      the translated word for attach, or null
    • setAttach

      public AiMessageInputI18n setAttach(@Nullable String attach)
      Sets the accessible name (aria-label) for the attach (paperclip) button.

      The attach button is icon-only, so this value is applied as its aria-label to give it an accessible name for screen readers.

      Parameters:
      attach - the translated word for attach, or null to fall back to the client-side default
      Returns:
      this instance for method chaining