Skip to main content
The UI Kit ships its interface in 19 languages and follows the language your app runs in.

Core Concepts

  • One string catalog. Every string the Kit draws lives in CometChatCore’s Localizable.xcstrings, so the SwiftUI and UIKit toolkits always say the same thing.
  • iOS picks the language. The Kit has no language setter: it shows the language iOS runs your app in — the device language, or the per-app language the user chose in Settings.
  • CometChatStrings exposes the Kit’s strings as read-only properties, so your own views can reuse the Kit’s wording.

Supported Languages

In a language the catalog lacks, the Kit falls back to English.

Set the UI Kit Language

iOS runs an app only in the languages the app declares, and the Kit follows the app. Add each language you support to your app target — in Xcode, Project ▸ Info ▸ Localizations, or the CFBundleLocalizations key:
Info.plist
The user then picks the language in Settings ▸ Your App ▸ Language, or iOS uses the device’s.
No setup beyond the app’s localizations — the toolkit reads the catalog on every render:
There is no locale setter: the language is the one iOS runs your app in.

Override UI Kit Labels

The catalog cannot be overridden from your app — there is no strings.xml-style merge on iOS. Change a label through the component that shows it:
State views take your own view — see State Views.
Reuse the Kit’s own wording in your views with CometChatStrings:

Customize Date & Time Labels

CometChatDateTimeFormatter has nine buckets — time, today, yesterday, lastWeek, otherDays, minute, minutes, hour, hours. Each returns String?; nil, or leaving the method out, keeps the Kit’s text, so you change only the buckets you care about.
A DateFormatter passed as dateFormat: replaces the formatter wholesale and wins over it.
Which buckets a component asks depends on the toolkit — the SwiftUI message header asks only otherDays, the UIKit one every bucket.

Additional API

The Kit has no locale getters or reset: use Locale.current and the view’s layout direction.

Next Steps

Sound Manager

The incoming-message sound.

Theme Introduction

Colours, fonts and dark appearance.