Skip to content

Latest commit

 

History

History
80 lines (53 loc) · 1.84 KB

File metadata and controls

80 lines (53 loc) · 1.84 KB

🌐 Basic Translator Using API

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).

📌 Features

  • 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

🛠️ Tech Stack

  • Python 3
  • Jupyter Notebook
  • deep-translator library

📦 Installation

  1. Clone the repository
git clone https://github.com/your-username/basic-translator-using-api.git
cd basic-translator-using-api
  1. Install required packages
pip install deep-translator
  1. Run the notebook

You can run the Jupyter notebook using:

jupyter notebook Basic_Translator_Using_API.ipynb

🚀 Usage

  1. Run all cells in the notebook.

  2. You'll be prompted to:

    • Enter the sentence you want to translate
    • Specify the source language (e.g., en for English)
    • Specify the target language (e.g., fr for French)
  3. The translated sentence will be printed in the output.

📚 Example

Enter a sentence: Hello, how are you?
Enter the source language: en
Enter the target language: es

Output:

Hola, ¿cómo estás?

📖 Supported Languages

The deep-translator library supports many languages. You can refer to deep-translator documentation or list supported languages in the notebook via:

from deep_translator import GoogleTranslator
print(GoogleTranslator.get_supported_languages(as_dict=True))

📄 License

This project is open-source and available under the MIT License.


Feel free to contribute or suggest improvements!