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

@@ -5,6 +5,7 @@
window.chatwootSettings = {
hideMessageBubble: false,
position: 'left',
locale: 'fr',
};
(function(d,t) {

View File

@@ -17,6 +17,7 @@
welcomeTagline: '<%= @web_widget.welcome_tagline %>',
welcomeTitle: '<%= @web_widget.welcome_title %>',
widgetColor: '<%= @web_widget.widget_color %>',
enabledLanguages: <%= available_locales_with_name.to_json.html_safe %>,
}
window.chatwootWidgetDefaults = {
useInboxAvatarForBot: <%= ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false)) %>,