translateStrings(stringsToTranslate)
Translates a list of strings.
Returns
A Promise that resolves to a response containing a grouping of key/value pairs.
Parameters
Name | Type | Description | Required |
stringsToTranslate | array | The list of strings to be translated. | ✅ |
Usage example
In this example, the API returns a Promise that resolves to a response containing a grouping of key/value pairs.
const stringsToTranslate = ["Hello", "Thank you"];
PCore.getAnalyticsUtils().translateStrings(stringsToTranslate).then(response => { console.log(response.data); }).catch(() => { ... });
// console output: { Hello: "Hola", "Thank you": "Gracias" }
Previous topic getInsightIDs() Next topic APIs in the AnnotationUtils class