Skip to main content
Set the CometChat UI Kit language and override UI text so your app matches your users’ locale.

Core Concepts

  • CometChatLocalize — utility object in chatuikit-core to set and read the UI Kit locale. Shared by both Kotlin XML and Jetpack Compose modules.
  • Language — constants for supported language codes (Language.ENGLISH, Language.FRENCH, etc.)
  • strings.xml — Android string resources that control visible text in UI Kit components. Override keys in your app’s strings.xml.

Supported Languages


Set the UI Kit Locale

Call CometChatLocalize.setLocale() before rendering any UI Kit components.

Override UI Kit Labels

Override any UI Kit string by adding the same key to your app’s res/values/strings.xml. No source code changes needed — Android’s resource merging handles it.
res/values/strings.xml
This works identically for both Kotlin XML Views and Jetpack Compose — both modules read from the same Android string resources.

Customize Date & Time Labels

Override how timestamps like “Today”, “Yesterday”, and “X mins ago” are displayed.
Set a DateTimeFormatterCallback on individual components:

Additional API