You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

You can set up the different default languages for your editable elements (instances) on the same page using the init() WProofreader initialization in a bundle with the setLang method and syncOptions parameter.

To do so, please follow the next steps:

1. Initialize WProofreader using the init() method when you clearly know in which control you want to initialize WProofreader which provides additional management options.

2. Pass the appropriate language shortcode for the setLang in WEBSPELLCHECKER.init, for example, using it in the combination with getInstances() method.

WEBSPELLCHECKER.getInstances()[0].setLang('NEW_LANGUAGE_CODE')

3. Disable synchronizing of ignore options and languages between all the created WProofreader instances using syncOptions in WEBSPELLCHECKER_CONFIG.

syncOptions: false,

4. If needed, disable storing of the user-selected language between browser sessions using disableOptionsStorage in WEBSPELLCHECKER_CONFIG.

If it's not done, the user-selected language will be saved in the browser local storage until it's cleared and the predefined options will be of no effect.

disableOptionsStorage: [lang],