@headwai/chat-bubble 6.3.0 β†’ 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,8 @@
8
8
  - πŸ“± Responsive design
9
9
  - 🎨 Customizable UI components
10
10
  - πŸ”„ Real-time messaging with WebSocket support
11
+ - 🌍 Internationalization (i18n) support - Auto-detects browser language
12
+ - πŸ‡¬πŸ‡§πŸ‡©πŸ‡ͺ Multi-language support (English, German)
11
13
 
12
14
  ### Easy Website Integration
13
15
 
@@ -36,6 +38,7 @@ Add the Headwai Chat Bubble to the respective .html file.
36
38
  faviconBackgroundColor: '#667eea', // optional - default: '#667eea'
37
39
  fontFamily: '"Inter", system-ui, sans-serif', // optional - default: 'inherit'
38
40
  fontSize: '16px', // optional - default: 'inherit'
41
+ locale: 'de-DE', // optional - auto-detects browser language, supported: en-GB, de-DE, de-AT
39
42
  };
40
43
  </script>
41
44
  </head>
@@ -205,6 +208,26 @@ The title displayed in the chat window header at the top of the chat interface.
205
208
  chatTitle: 'Customer Support';
206
209
  ```
207
210
 
211
+ #### `locale`
212
+
213
+ **Type:** `string` | **Default:** Auto-detected from browser
214
+ Sets the language/locale for the widget interface. The widget automatically chooses the locale based on the following priority:
215
+
216
+ 1. **Configuration override** - Explicitly set via `locale` parameter
217
+ 2. **Browser language** - Auto-detected from `navigator.language`
218
+ 3. **Fallback** - Defaults to English (en-GB) if unsupported language
219
+
220
+ ```javascript
221
+ locale: 'de-DE'; // Force German interface
222
+ ```
223
+
224
+ **Supported Languages:**
225
+ - `'en-GB'` - English (United Kingdom) - Default
226
+ - `'de-DE'` - German (Germany)
227
+ - `'de-AT'` - German (Austria)
228
+
229
+ If your browser is set to German (de-DE, de-AT, or just "de"), the widget will automatically display German text. For all other languages, it falls back to English.
230
+
208
231
  ### Styling Configuration
209
232
 
210
233
  #### `userMessageBackgroundColor`
@@ -0,0 +1 @@
1
+ const e={chat:{header:{title:"HeadwAI Chat Bubble",newChat:"Neuen Chat starten",downloadHistory:"Chat-Verlauf herunterladen",closeChat:"Chat schließen"},content:{placeholder:"Geben Sie hier Ihre Fragen ein",initialMessage:"Hallo, wie kann ich Ihnen helfen?",feedback:{positive:"Gute Antwort",negative:"Schlechte Antwort"}}}};export{e as default};
@@ -0,0 +1 @@
1
+ const e={chat:{header:{title:"HeadwAI Chat Bubble",newChat:"Start new chat",downloadHistory:"Download chat history",closeChat:"Close chat"},content:{placeholder:"Enter your questions here",initialMessage:"Hey, how can I help you?",feedback:{positive:"Good response",negative:"Poor response"}}}};export{e as default};