AI Integration Quick Reference
AI Integration Quick Reference
Setting the Language
Global Translation Overrides
Override specific translation keys for any language:Using the Translate Pipe
Resolution Priority
When resolving a translation key:- Global translation for current language
- Fallback language translation (default: en-US)
- Returns the key itself if nothing found
Adding a New Language
Programmatic Translation
In TypeScript code (outside templates):Initialization Options
Date & Time Localization
CalendarObject
UseCalendarObject to customize how dates and times are displayed throughout the UIKit. Supports relative time formatting for minutes and hours.
Global Configuration
Apply a custom date format globally viaCometChatLocalize.init():
Component-Specific Configuration
Pass aCalendarObject directly to a component to override the global format for that component only:
formatDate
Format a Unix timestamp using aCalendarObject directly:
Returns a formatted date
string.