Feature: Introduce locale in web-widget SDK (#871)

* Introduce setLocale in SDK

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-05-17 16:15:53 +05:30
committed by GitHub
parent 2e8cd59a06
commit 59f4dd7ebe
10 changed files with 67 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ To hide the bubble, you can use the following setting. Please not if you use thi
window.chatwootSettings = {
hideMessageBubble: false,
position: 'left', // This can be left or right
locale: 'en', // Language to be set
}
```
@@ -37,6 +38,14 @@ window.$chatwoot.setUser('identifier_key', {
Make sure that you reset the session when the user logouts of your app.
### To set language manually
```js
window.$chatwoot.setLocale('en')
```
To set the language manually use the setLocale function.
### To set labels on the conversation
Please note that the labels will be set on a conversation, if the user has not started a conversation, then the following items will not have any effect.