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:
- Open the Embedded Service deployment.
- Select “Custom Labels”.
- 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: