translateText
Translate a single text. USER-ONLY
Parameters
toLanguage: string
The code of the language to translate into.
The text to translate.
tone?: string
The tone of the translation.
Result
Syntax
// Required parameters only.
await client.translateText(toLanguage, text);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.translateText(toLanguage, text, { tone });