The text to be translated.
The target language code for the translation (defaults to 'ja' for Japanese).
A promise that resolves with the translated string.
Will throw an error if the translation fails.
import { translate } from "@skeet-framework/ai"
const translatedText = await translate("Hello", "es")
console.log(translatedText); // Outputs: "Hola"
Generated using TypeDoc
Translates the provided text into the specified target language.