Επεξεργασία

Κοινή χρήση μέσω


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. For the full list of supported languages, see Language support.

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 automatic translation of the entire document when the Immersive Reader loads.

const options = {
    translationOptions: {
        autoEnableDocumentTranslation: true
    }
};

Enable automatic word translation

Set autoEnableWordTranslation to true to enable single word translation.

const options = {
    translationOptions: {
        autoEnableWordTranslation: true
    }
};

Next step