Salesforce Messaging for In-App and Web Translation

Salesforce Messaging for In-App and Web Translation

embeddedservice_bootstrap.settings.language can be used for translating Salesforce Messaging for In-App and Web.

embeddedservice_bootstrap.settings.language allows us to set different languages for the Salesforce Messaging for In-App and Web.

Add the languages on the Messaging Channel.

To further update the translations, use the following steps:

  1. Open the Embedded Service deployment.
  2. Select “Custom Labels”.
  3. Select the Language, Chat Group, Label Group and Label Type to modify it further.

Sample code to read URL query parameter for Language:

const params = new URLSearchParams(
    window.location.search
);
let varLang = 
    params.has( 'language' ) ?
    params.get( 'language' ) : 
    'en_US';
console.log(
    'Language is',
    varLang
);
embeddedservice_bootstrap.settings.language = varLang;

Output:

Leave a Reply