This project is a simple language translator built using Python and the deep_translator library. It translates input text from a source language to a target language using an API (Google Translator in this case).
- Translate any text from one language to another
- Supports a wide variety of languages
- Simple and interactive input/output flow
- Easily extendable for use in other applications
- Python 3
- Jupyter Notebook
- deep-translator library
- Clone the repository
git clone https://github.com/your-username/basic-translator-using-api.git
cd basic-translator-using-api- Install required packages
pip install deep-translator- Run the notebook
You can run the Jupyter notebook using:
jupyter notebook Basic_Translator_Using_API.ipynbRun all cells in the notebook.
You'll be prompted to:
- Enter the sentence you want to translate
- Specify the source language (e.g.,
enfor English) - Specify the target language (e.g.,
frfor French)
The translated sentence will be printed in the output.
Enterasentence: Hello, howareyou?
Enterthesourcelanguage: enEnterthetargetlanguage: esOutput:
Hola, ¿cómo estás?
The deep-translator library supports many languages. You can refer to deep-translator documentation or list supported languages in the notebook via:
fromdeep_translatorimportGoogleTranslatorprint(GoogleTranslator.get_supported_languages(as_dict=True))This project is open-source and available under the MIT License.
Feel free to contribute or suggest improvements!