Language Detection & Translation Tool (Python)
A simple Python desktop application that detects the language of user-provided text, translates it into English, and applies basic spelling correction using TextBlob. The application uses a Tkinter GUI for user input and output.
📌 Features
Detects the source language automatically
Translates text to English
Performs spelling correction on translated text
Simple GUI input dialog and output popup
Uses Natural Language Processing (NLP) via TextBlob
🛠 Technologies & Libraries
Python
TextBlob
NLTK
Tkinter
Pandas (imported, optional/future use)
it’s a GUI-based language detection, translation, and correction tool built on top of TextBlob + Tkinter.
This project is a simple desktop application that detects the language of user-entered text, translates it into English, performs basic spelling correction, and displays the result using a graphical interface.
It leverages TextBlob for NLP tasks and Tkinter for user interaction.
*Automatic Language Detection *Translation to English *Spelling & Grammar Correction *Simple GUI input dialog ***Built using lightweight Python libraries
- Python 3
- TextBlob
- NLTK
- Tkinter
- Pandas (imported, optional for future enhancements)
├── main.py # Main application script ├── README.md # Project documentation |__ country.csv # Language Code file
-
A Tkinter dialog prompts the user to enter text.
-
The application:
- Detects the language of the input text
- Translates it to English
- Applies spelling correction
-
The corrected English output is shown in a message box and printed in the console.
Input (any language):
Hola, cómo estas?
Detected Language Code:
es
Output (English, corrected):
Hello, how are you?
-
TextBlob.detect_language()Detects the source language. -
TextBlob.translate()Translates text into English. -
TextBlob.correct()Applies spelling correction. -
tkinter.simpledialog.askstring()Collects user input via GUI. -
tkinter.messagebox.showinfo()Displays translated output.
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-namepip install textblob nltk pandasimport nltk
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')python main.pyA dialog box will appear asking for text input.
- Requires an internet connection for language detection and translation.
- TextBlob’s translation relies on Google Translate (unofficial API).
- Some unused classifier imports are commented out — these suggest planned ML extensions.
- Add language selection dropdown
- Show detected language name instead of code
- Add batch file translation
- Integrate ML classifiers (Naive Bayes, Random Forest, etc.)
- Improve GUI layout
Md Ruhul Kibria Maruf Md ruhul Kibria Maruf GitHub:https://github.com/Rkmaruf