Back to docsRecipe
Realtime chat translation
Build a chat room where every message is instantly translated into the reader's preferred language using Meridian streams and a translation provider.
⚡
Sub-100ms latency
Messages appear translated before the sender finishes typing.
🌐
12 languages
Each participant reads in their own locale without extra round trips.
🔒
E2E encrypted
Plaintext never touches the translation service; only ciphertext transits Meridian.
Architecture
Client A (en) ──► Meridian stream ──► Client B (ja)
│
Translation edge
(DeepL / Google Cloud)
│
Translated payload
broadcast to all subscribersKey steps
- Create a stream — one Meridian stream per chat room, scoped to participants.
- Attach translation edge — a lightweight function that detects source language and fans out translations.
- Subscribe with locale — each client declares their preferred language on connect.
- Render translated payload — the client receives only the message in their language.