NEWCKEditor AI on your premises: Hook your LLM and register MCP tools. Webinar coming soon!
Sign up (with export icon)

AIChatShortcutTranslateDefinition

Api-interface iconinterface

A shortcut that interacts with the AI Translate.

Note: This shortcut type requires the AITranslate plugin to be loaded.

This type of shortcut can run the translation with any of the available languages. It can be one of the languages available by default, or a custom language defined by the integrator via the config.ai.translate.languages configuration option.

Example of a shortcut that opens the AI Translate mode:

{
	id: 'open-translate',
	label: 'Open translate',
	type: 'translate'
}
Copy code

Example of a shortcut that runs the translation to Spanish:

{
	id: 'translate-to-spanish',
	label: 'Translate this document to Spanish',
	type: 'translate',
	language: 'spanish'
}
Copy code

Properties

  • Chevron-right icon

    icon : string | undefined
    readonlyinherited

    The icon of the shortcut in SVG string format.

    Learn more about setting the icon in the IconView API reference.

    Note: When not provided, a generic icon associated with the shortcut type will be used instead.

  • Chevron-right icon

    id : string
    readonlyinherited

    The unique identifier of the shortcut.

  • Chevron-right icon

    label : string
    readonlyinherited

    The human-readable label of the shortcut.

  • Chevron-right icon

    language : string | undefined
    readonly

    The language to be used for the translation.

    See languages for the list of supported languages.

    Note: When not provided, the shortcut will switch the user interface to the AI Translate.

  • Chevron-right icon

    type : 'translate'

    The type of the shortcut.