How to build a Telegram translator bot for group chats
By the Botable team
A Telegram translator bot detects the language of a message and returns it in the language you want. In a group it can mirror every message so a multilingual room reads as one conversation. Describe your language pairs and Botable builds it.
What is a translator bot?
A Telegram translator bot removes the copy-paste step between a chat and a translation tool. In a private chat the behaviour is simple: send text, get it back in a target language, with the source language detected rather than declared. In a group it gets more interesting and more dangerous — mirroring every message doubles the traffic, so the useful pattern is translate-on-reply, where a user replies to a message with a command and only that message is translated. If you do want full mirroring, restrict it to specific language pairs and post the translation as a compact reply rather than a new message. Per-user language preference is worth storing so nobody has to name a target language every time. Machine translation is also a quality risk on public pages: it is fine in a chat, but translated content published to the web without review is exactly what Google's guidance treats as low-value scaled content.
What commands does it have?
| Command | What it does |
|---|---|
/tr <text> | Translates text into the saved target language |
Reply + /tr | Translates the message being replied to |
/setlang es | Saves the user's target language |
/detect | Reports which language a message is in |
/mirror on | Auto-translates every message in this group |
What do you need before you start?
- A Telegram bot token from @BotFather
- The language pairs you actually need — a short list keeps replies fast
- A decision: translate on request, or mirror everything
How do you build it?
Should the bot translate everything or only on request?
On request, in most groups. Reply to a message with the command and only that message is translated. Full mirroring doubles every message in the room and becomes noise quickly; keep it for small, genuinely bilingual groups.
How does the bot know which language to translate into?
Store a target language per user, set once. Without it every request needs two arguments and people stop using it. Detection handles the source side, so the user never has to say what they typed.
How should a translation be formatted?
As a reply to the original, with the detected source language named. That keeps the thread readable and makes it obvious which message the translation belongs to — a loose translation posted as a new message loses its referent immediately.
Can it handle voice messages or images?
Transcription and image text are separate capabilities; describe them explicitly if you want them. A text-only translator is faster to build and covers the common case.
A prompt you can use as-is
Paste this into Botable and adjust the details. It is specific on purpose — a vague description produces a vague bot.
Build a translator bot. /setlang <code> saves my target language. /tr <text> translates into it, detecting the source language automatically and naming it in the reply. Replying to any message with /tr translates that message and posts the result as a reply to it. /mirror on|off toggles auto-translation for a group, and when it is on, only translate between English and Spanish and keep the translation as a compact reply rather than a new message.
Who is this bot for?
- Cross-border teams working in one Telegram group
- Communities with members in several countries
- Support teams answering customers who write in another language
What goes wrong with this kind of bot?
- Full group mirroring doubles message volume — start with translate-on-reply
- Idioms and slang translate badly; keep a human in the loop for anything commercial
- Do not publish machine-translated text to a website unreviewed; that is scaled low-value content
Questions about translator bots
How many languages can it handle?
As many as your translation source supports. Naming the handful you actually need keeps replies fast and the command surface small.
Can it translate the bot's own replies?
Yes. If your bot has other features, its messages can follow each user's saved language, which is usually more valuable than translating other people's text.