
Cometchat I18n
Configure CometChat UI Kit localization across React, React Native, Angular, Android, iOS, and Flutter without breaking on CometChatLocalize.init signature differences between families.
Overview
CometChat i18n is an agent skill for the Build phase that localizes CometChat UI Kits across React, mobile, and web families with correct CometChatLocalize.init usage.
Install
npx skills add https://github.com/cometchat/cometchat-skills --skill cometchat-i18nWhat is this skill?
- Cross-family reference for CometChat UI Kit v4.x / v5.x / v6.x localization APIs.
- Documents CometChatLocalize.init signature drift (e.g., React v6 object signature vs Angular positional forms).
- Covers English plus roughly fifteen bundled languages with version-dependent exact sets.
- Explains custom-language registration at runtime and English fallback behavior.
- Includes RTL support guidance for Arabic, Hebrew, and related locales.
- Ships English plus on the order of 15 bundled languages per kit (exact set varies by version)
- Skill metadata version 4.0.0 with CometChat UI Kit v4.x / v5.x / v6.x compatibility
Adoption & trust: 1 installs on skills.sh; 35 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your CometChat chat UI works in English but init calls fail or strings drift when you add locales because each UI Kit family documents localization differently.
Who is it for?
Solo builders integrating CometChat UI Kits who need one skill that spans React, native mobile, and Flutter localize setup.
Skip if: Apps without CometChat UI Kits or projects that only need server-side message translation outside the kit widgets.
When should I use this skill?
Agent is configuring CometChat UI Kit localization, CometChatLocalize.init, RTL, custom languages, or cross-family l10n drift.
What do I get? / Deliverables
You configure bundled or custom languages, RTL, and fallbacks with the correct init signature per kit so localized chat UI renders consistently before ship.
- Correct per-family CometChatLocalize initialization
- Documented bundled, custom, and fallback language behavior for the chosen kit
Recommended Skills
Journey fit
Canonical shelf is Build because the skill wires runtime i18n into an in-progress CometChat UI Kit integration. Integrations subphase reflects cross-family SDK configuration—init signatures, bundled languages, RTL, and custom language registration—not generic app copy editing.
How it compares
CometChat-specific integration reference—not a generic i18next or react-intl tutorial for non-CometChat UI.
Common Questions / FAQ
Who is cometchat-i18n for?
Developers shipping CometChat-powered chat in web or mobile apps who configure localization through CometChatLocalize rather than ad-hoc string files alone.
When should I use cometchat-i18n?
During Build integrations when adding locales or RTL; during Ship testing when verifying language switch and English fallback across kit versions.
Is cometchat-i18n safe to install?
It references file read and shell-style agent tools for auditing projects—review the Security Audits panel on this Prism page and scope shell access to your repo only.
SKILL.md
READMESKILL.md - Cometchat I18n
## Purpose Localize the CometChat UI Kit to the user's language. Every kit ships with English + ~15 bundled languages (Arabic, Bengali, Chinese, German, Spanish, French, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Portuguese, Russian, Swedish, Turkish — exact set varies by kit version). Custom languages can be added at runtime. The biggest gotcha: **the `init` signature differs across kits and major versions**. The same audit pass that caught calls API drift caught one of these too (Angular Localize positional signature) — this skill is the canonical reference. --- ## API surface per family ### React (v6) — object signature ```ts import { CometChatLocalize } from "@cometchat/chat-uikit-react"; CometChatLocalize.init({ language: "es", fallbackLanguage: "en", }); ``` Object literal. `init({ ... })`. ### React Native (v5) — object signature ```ts import { CometChatLocalize } from "@cometchat/chat-uikit-react-native"; CometChatLocalize.init({ language: "es", fallbackLanguage: "en", }); ``` Same object signature as React. ### Angular (v4) — POSITIONAL signature ```ts import { CometChatLocalize } from "@cometchat/chat-uikit-angular"; CometChatLocalize.init("es"); // or with custom resources: CometChatLocalize.init("es", { es: { CHAT: "Charla" } }); ``` **Positional, not object.** This was the v4.0 audit fix — calling `.init({ language: "es" })` on Angular sets `language = [object Object]` and silently breaks translations. The skill's verification checklist flags this drift. ### Android V5 — Java/Kotlin static method ```kotlin // Kotlin CometChatLocalize.setLocale(Locale.forLanguageTag("es")) ``` ```java // Java CometChatLocalize.setLocale(Locale.forLanguageTag("es")); ``` `setLocale`, not `init`. Takes a `java.util.Locale`. ### Android V6 (beta) — same as V5 V6 keeps the `setLocale(Locale)` API. No drift here. ### iOS V5 ```swift import CometChatUIKitSwift CometChatLocalize.setLocale(locale: "es") ``` `setLocale(locale:)`. Takes a String, not `Locale`. ### Flutter V5 (GetX-based) ```dart import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart'; CometChatLocalize.init(language: 'es'); ``` Named-arg, not positional. Single string. ### Flutter V6 (Bloc-based) ```dart import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart'; CometChatLocalize.init(language: 'es'); ``` Same as V5 in Flutter — named arg. --- ## Cross-family signature summary | Family | Init call | Notes | |---|---|---| | React (v6) | `CometChatLocalize.init({ language, fallbackLanguage })` | Object | | React Native (v5) | `CometChatLocalize.init({ language, fallbackLanguage })` | Object | | **Angular (v4)** | `CometChatLocalize.init("es")` | **Positional — drift trap** | | Android (V5/V6) | `CometChatLocalize.setLocale(Locale.forLanguageTag("es"))` | Method name `setLocale`, takes `Locale` | | iOS (V5) | `CometChatLocalize.setLocale(locale: "es")` | Method name `setLocale`, takes String | | Flutter (V5/V6) | `CometChatLocalize.init(language: 'es')` | Named arg | The agent must consult this table before writing any localization code. **Verify against the installed package's type definitions** if uncertain — symbol drift between mino