Feature | v5 | v6 |
---|---|---|
Initialization | Used init(language, resources) with separate params. | Uses init(settings: LocalizationSettings) with a configuration object. |
Translation Management | Manually updated translations using resources . | Uses translationsForLanguage in init() and addTranslation() . |
Language Codes | Used shorthand codes (e.g., en , fr ). | Uses full language-region codes (e.g., en-US , fr ). |
Date & Time Localization | Not configurable. | Supports CalendarObject for date formatting. |
Timezone Handling | Not available. | Introduced timezone setting. |
Missing Key Handler | Not available. | Introduced missingKeyHandler to handle missing translations. |
CometChatLocalize.init()
accepts 2 parameters: language
& resources
CometChatLocalize.init()
method accepts a localization setting instead of individual parameters.
en
. In CometChat v6 UI Kit, the language codes have been expanded to distinguish between regional variants: • en-US
for American English • en-GB
for British English
There are no changes for any other languages.
init()
method.
init()
method or the addTranslation()
method.
CalendarObject
for date and time formatting.
missingKeyHandler
for better control.
en
.
en-US
& en-GB
.