A Python-based tool for translating text between languages using the googletrans
library. This project simplifies language translation by leveraging Google Translate's API and supports a wide range of languages.
- Multi-Language Translation: Translate text dynamically between various supported languages.
- User-Friendly Input: Enter text and specify source and destination language codes for seamless translation.
- Built-In Error Handling: Provides informative messages in case of translation failures.
- Lightweight and Simple: Easy to set up and extend for additional features.
- Python 3.8+
googletrans
library
-
Clone the repository:
git clone https://github.com/FurqanTheGreat/CodeAlpha_Language_Translation_Tool.git cd CodeAlpha_Language_Translation_Tool
-
Install dependencies:
pip install -r requirements.txt
-
Run the script:
python translator.py
- Enter the text you want to translate.
- Specify the source language (e.g., English) or leave it blank for auto-detection.
- Specify the target language code (e.g., Spanish).
- View the translated text instantly!
Simple Language Translation Tool
Supported languages: English, Spanish, French, German, etc.
Enter text to translate: Hello, how are you
Enter source language (leave blank for auto-detection): English
Enter destination language: Spanish
Source Language: English
Translated Text (english -> spanish):
Hola, ¿cómo estás?