Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeAlpha_LanguageTranslator

Task 1 — Language Translation Tool | CodeAlpha Artificial Intelligence Internship

A web-based translation tool that translates text between 29 languages (including 11 Indian languages) using the Google Translate engine via the free deep-translator library — no API key required.

Features

  • Source & target language selection, with automatic language detection
  • Real-time translation through the Google Translate engine (deep-translator)
  • Copy to clipboard button
  • Text-to-speech for the translated output (browser SpeechSynthesis API — free and offline)
  • Language swap button (also swaps translated text back into the input)
  • Character counter with a 5000-character limit and input validation
  • Graceful error handling (empty input, network failures, same-language requests)
  • Keyboard shortcut: Ctrl + Enter to translate
  • Fully responsive UI (works on mobile)

Tech Stack

Layer Technology
Backend Python, Flask
Translation deep-translator (Google Translate engine)
Frontend HTML, CSS, vanilla JavaScript
TTS Web SpeechSynthesis API

Setup & Run

git clone https://github.com/Alexy-ak06/CodeAlpha_LanguageTranslator.git
cd CodeAlpha_LanguageTranslator
pip install -r requirements.txt
python app.py

Open http://127.0.0.1:5000 in your browser.

Note: translation requires an internet connection (requests go to the Google Translate web engine).

How It Works

  1. The user enters text and picks source/target languages.
  2. The frontend sends a JSON POST /translate request to the Flask backend.
  3. Flask calls GoogleTranslator(source, target).translate(text) from deep-translator.
  4. The translated text is returned as JSON and rendered instantly — with copy and listen actions.

Demo

🎥 Video walkthrough: https://www.linkedin.com/posts/ayush-kumar-mahapatra-886ab237a_codealpha-artificialintelligence-nlp-ugcPost-7481034146207952896-Pr21/?utm_source=share&utm_medium=member_desktop&rcm=ACoAAF3HZWYBOQ_5jquDqaXp5h5PRev5u1-Z_Kk


Built by Ayush for the CodeAlpha AI Internship — July 2026.

About

Task 1 of the CodeAlpha AI Internship — a Flask web app that translates text between 29 languages using deep-translator, with copy-to-clipboard and text-to-speech.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages