translateDescription:
The translate executor translates text from one language to another language using the Translator service.
Parent: execute, then, else
Value (simple form): string specifying the text to be translated
Value (key/value form):
translate: string, required, specifying the text to be translatedfrom: string, required, specifying the language code used for the source language (default: null; auto detected)to: string, optional, specifying the language code used for the target language (default: set per configuration)# simple form
- translate: (string)
# simple example
- translate: '{clipboard.text}'
# key/value form
- translate: (string, required)
from: (string, optional)
to: (string, optional)
# key/value example
- translate: '{clipboard.text}'
to: 'en'
from: 'de'
EXAMPLE
# translate the selected text to english
commands:
- name: translate SELECTED TEXT to english
triggers:
- phrase: translate that
- phrase: translate that to english
execute:
- sendKeys: '{200 wait}{ctrl-c}{200 wait}'
- translate: '{clipboard.text}'
to: 'en'
- display: '{translate.text}'
- clipboard: '{translate.text}'
Additional information:
translate executor translate the text, the translation is available to subsequent executors in the same execution context:
translate.text - the text translatedStatus: ✅ IMPLEMENTED