A Telegram bot that translates text between 9 languages:
- 🇺🇸 United States (English)
- 🇮🇷 Iran (Persian)
- 🇫🇷 France (French)
- 🇰🇷 South Korea (Korean)
- 🇪🇸 Spain (Spanish)
- 🇸🇪 Sweden (Swedish)
- 🇨🇳 China (Chinese)
- 🇹🇷 Turkey (Turkish)
- 🇸🇦 Saudi Arabia (Arabic)
- Auto language detection
- Easy-to-use interface
- Python 3.12.4 or later
- Libraries:
pyTelegramBotAPI
,googletrans
pip install pyTelegramBotAPI googletrans==4.0.0-rc1
- Clone the repository:
git clone https://github.com/username/repository_name.git cd repository_name
- Set the bot token:
export BOT_TOKEN=your_bot_token
- Run the bot:
python translator 🌍.py
- Start with
/start
. - Choose source and target languages.
- Send text for translation.
- Keep your BOT_TOKEN secure.
- Use
.env
and.gitignore
.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
This should work well when added to your GitHub repository’s `README.md`. It organizes the content with clear headers, and it's formatted properly to make it easy to read and use.