The language code of the source text. If not provided, the API will attempt to
auto-detect the language. All supported language codes can be found
here.
The translated text. The format matches your input: - If you sent a single
string, you’ll receive a single translated string - If you sent an array of
strings, you’ll receive an array of translated strings
Copy
import { JigsawStack } from "jigsawstack";const jigsaw = JigsawStack({ apiKey: "your-api-key" });const response = await jigsaw.translate.text({ "text": [ "Hello", "How are you?", "Thank you" ], "target_language": "zh"})