The Problem
When chatting on Telegram with people who speak different languages, I kept running into the same annoying process: see a message I don’t understand, leave Telegram, open Google Translate, paste the text, read the translation, then go back to Telegram. It wastes time. So I built a translator inside Telegram on AutoKitteh. To use it: start here.
What It Does
The bot has two main commands:
- /translate – Use this when you know what language the message is in. For example: /translate Spanish Hello, how are you? translates your English text to Spanish.
- /detect – Use this when you don’t know the source language. For example: /detect English Hola, ¿cómo estás? auto-detects that it’s Spanish and translates it to English.
Both commands don’t just translate word-for-word. They explain slang, idioms, and cultural context so you actually understand what people mean.
How to Use
The best way to use the bot is to create a private channel in Telegram (call it “Translator” or whatever you want) and add your bot to it. This gives you a dedicated space to translate messages without anyone else seeing them.
When you see a message in another chat that you don’t understand, simply copy it, go to your translator channel, and use /detect English [paste message] to get the translation, or /translate
You can also add the bot to group chats or direct conversations, but keep in mind that everyone in that chat will see the bot’s responses. This works fine if you’re all using it together, but might be awkward if you’re the only one translating.
How It Works
The setup is straightforward:
- Integrated connections in AutoKitteh Telegram and Gemini (though you can swap Gemini for OpenAI or Anthropic if you prefer)
- Wrote prompts that tell the LLM to translate with context and cultural nuances
- Created a function that triggers on Telegram message events
- The function checks which command was used (/translate or /detect), extracts the target language and message, sends it to the LLM with the prompt, and gets the response back
- Used the Telegram Python SDK to send the response back to the same chat
That’s it. No complex architecture, no database, just a workflow that responds to messages. I wrote this from scratch without AI help because it’s simple and direct. But AutoKitteh actually lets you describe what you want and generates the project for you if you prefer.
How to Deploy
- Create a Telegram bot using BotFather (Telegram’s official bot for making bots)
- Go to AutoKitteh and choose “Start from template” or click here.
- Select “Telegram AI Translator Bot”
- Initialize connections by adding API keys for Telegram and Gemini
- If you want to use a different LLM, create a new connection with OpenAI or Anthropic and update the code to use their Python SDK
- Click deploy
- Add your bot to a channel and start using /translate or /detect
AutoKitteh handles the Telegram webhook registration automatically. Telegram needs a secure HTTPS endpoint to send messages to.
AutoKitteh creates and manages that for you. You just focus on the code.
Meaning now we have a bot that responds instantly because it’s event-driven. No polling, no delays. The moment a message arrives in Telegram, the function triggers automatically.
What’s Next
This is just the starting point. You can add more integrations and play with the project however you like. The simple foundation and the help of autokitteh makes it easy to expand based on whatever you need, for example:
- Create a learning mode – Store words you’ve translated in a database (like Notion or google sheets). At the end of each day, the bot sends you a quiz of the new words you encountered to help you actually learn the language.
- Multi-language group chats – When added to a group with multiple languages, automatically detect and translate every message to each person’s preferred language. Everyone sees messages in their own language.
- Combine with calendar integration – Connect to Google Calendar. When you have a meeting scheduled with someone from another country, the bot can teach you key phrases in their language beforehand.