This is a simple Language Detection Web App built using Python, FastAPI, and langdetect.
It can automatically identify the language of any text you enter — in seconds! ⚡
🎥 Watch the full Shorts video here:
👉 Detect Any Language
- Detects languages like Hindi, English, French, German, Chinese, Japanese, and more.
- Built with FastAPI for backend and HTML + JavaScript for frontend.
- Real-time language detection response.
- Simple, lightweight, and beginner-friendly.
- Python 3.8+
- FastAPI
- Uvicorn
- langdetect
- Jinja2 (for HTML templates)
├── main.py # FastAPI backend ├── templates/ │ └── index.html # Frontend HTML template ├── requirements.txt # Dependencies └── README.md # Project documentation
git clone https://github.com/your-username/language-detector-fastapi.git
cd language-detector-fastapipython -m venv venv
source venv/bin/activate # for Linux/Mac
venv\Scripts\activate # for Windowspip install -r requirements.txtuvicorn main:app --reloadVisit 👉 http://127.0.0.1:8000🧠 How It Works
The user types any text in the input box.
The frontend sends it to the /detect API route.
The FastAPI backend uses langdetect to identify the language.
The detected language name and code are displayed instantly on screen.
📦 Example Output
{
"success": true,
"language": "Hindi",
"code": "hi"
}👨💻 Author
Chandrakanta Panda 🔗 YouTube: @programmerchandra
📧 Feel free to connect and share ideas!