How to configure translation
This article demonstrates how to configure the various options for translation in the Immersive Reader.
Configure translation language
The options parameter contains all of the flags that can be used to configure translation. Set the language parameter to the language you wish to translate to. See the Language Support for the full list of supported languages.
const options = {
translationOptions: {
language: 'fr-FR'
}
};
ImmersiveReader.launchAsync(YOUR_TOKEN, YOUR_SUBDOMAIN, YOUR_DATA, options);
Automatically translate the document on load
Set autoEnableDocumentTranslation to true to enable automatically translating the entire document when the Immersive Reader loads.
const options = {
translationOptions: {
autoEnableDocumentTranslation: true
}
};
Automatically enable word translation
Set autoEnableWordTranslation to true to enable single word translation.
const options = {
translationOptions: {
autoEnableWordTranslation: true
}
};
Next steps
- Explore the Immersive Reader SDK Reference