AI Integration Quick Reference
AI Integration Quick Reference
Overview of Changes
CometChatLocalize
Initialization
In CometChat v5 UI Kit, theCometChatLocalize.init() accepts 2 parameters: language & resources
V5 UI Kit
CometChatLocalize.init() method accepts a localization setting instead of individual parameters.
V6 UI Kit
Language Code Changes
In CometChat v5 UI Kit, the language code for English wasen. In CometChat v6 UI Kit, the language codes have been expanded to distinguish between regional variants:
en-USfor American Englishen-GBfor British English
Managing Translations
In CometChat v5 UI Kit, the only way to add or override translations was by passing them in theinit() method.
V5 UI Kit
init() method or the addTranslation() method.
V6 UI Kit
Handling Date & Time Localization
CometChat v5 UI Kit lacked support for date formatting, but CometChat v6 UI Kit introduces theCalendarObject for date and time formatting.
V6 UI Kit
Handling Missing Translation Keys
CometChat v5 UI Kit did not handle missing translation keys, whereas CometChat v6 UI Kit introduces amissingKeyHandler for better control.
V6 UI Kit
Migrating JSON Translation Files
In CometChat v5 UI Kit, the language code for English wasen.
V5 UI Kit
en-US & en-GB.
V6 UI Kit
Additional Resources
CometChatLocalize Class
View the source code for the localization class.
Language JSON Files
Browse all available language translation files.
Property Changes
In CometChat v6 UI Kit, several props and methods in components and the CometChatLocalize class have been updated. Below is a detailed reference of renamed, added, and removed properties and methods.Conversations
New Properties
Removed Properties
Message Header
New Properties
Message List
New Properties
Removed Properties
Thread Header
New Properties
Call Logs
New Properties
Removed Properties
CometChatLocalize Class
New Methods
Renamed Methods
Removed Methods
Next Steps
React.js Integration
Fresh v6 setup guide for React.js.
Components Overview
Explore all v6 prebuilt UI components.
Theme
New CSS variable-based theming system.
Methods
Init, login, logout, and other UI Kit methods.