Translations
Replace any text the chat shows - buttons, menus, tooltips, aria-labels, toasts, empty states and the call screen.
Replace UI text (translations)
locale only formats dates and times. To translate text, pass translations. Every string has a key in CHAT_MESSAGES; pass only the keys you want to change and everything else stays English.
import { CHAT_MESSAGES, type ChatTranslations } from "@convo-sco/sdk-react"; const es: ChatTranslations = { "common.cancel": "Cancelar", "socket.connected": "Conectado", "messages.empty.title": "Aún no hay mensajes", "header.lastSeen": "Visto por última vez {time}", "forward.recipientsSelected": "{count} destinatarios seleccionados",}; <ChatMain {...chatConfig} translations={es} />Placeholders, plurals, live updates
- Placeholders.
{name},{count},{time}and so on are filled in for you. Keep them in your text, in any position. - Plurals. Countable text has a singular
…Onekey and a plural key, e.g.header.participantCountOne/header.participantCount. - Live updates. Pass a new object when the user switches language and the open chat re-renders. No remount needed.
- Type-checked.
ChatTranslationsonly accepts real keys, so a typo is a compile error, and typing"header.autocompletes them. - Finding a key. The full list (1032 keys with their English text) ships in the npm package as
docx/TRANSLATIONS.md. Search it for the words you see in the chat and copy the key.
Key groups
In your own components (useChatT)
useChatT() returns the same translator. It re-renders when translations changes and falls back to English outside the chat. useChatLocale().t is the same function; chatT is for code that is not a component, such as a toast fired from a callback.
import { useChatT } from "@convo-sco/sdk-react"; function MyEmptyState() { const t = useChatT(); return <p>{t("messages.empty.title")}</p>;}What stays English
On purpose: text sent to the server for every participant (for example the whiteboard "PDF uploaded" system message), host event payloads such as SessionEnd, and onError messages, which are meant for your logs.