Skip to main content

Overview

CometChat V6 UI Kit provides language localization to adapt to the language of a specific country or region. The CometChatLocalize class allows you to detect the language of your users based on their device settings and set the language accordingly. The UI Kit supports 19 languages:
  • Arabic (ar), German (de), English (en, en-GB), Spanish (es), French (fr), Hindi (hi), Hungarian (hu), Japanese (ja), Korean (ko), Lithuanian (lt), Malay (ms), Dutch (nl), Portuguese (pt), Russian (ru), Swedish (sv), Turkish (tr), Chinese (zh, zh-TW)

Usage

Integration

Add the following dependency in pubspec.yaml:

Update MaterialApp Localizations Delegates:

You can also translate specific strings:

Customizing UI Kit Translations for a Specific Language

Override a specific language’s default translations by creating a custom localization class:
Then add CustomEN.delegate to your localizationsDelegates list before cc.Translations.delegate.

Adding New Language Support

Extend the UI Kit with a new language by creating a custom translation class:

DateTimeFormatter

By providing a custom DateTimeFormatterCallback, you can globally configure how time and date values are displayed across all UI components. For details, refer to the CometChatUIKit class.