Amazing-Python-Scripts

Форк
0

README.md

Translation Script

This Python script allows you to translate a string of text into the language of your choice using the Google Translate service.

Prerequisites

  • Python 3.x
  • googletrans library (version 4.0.0-rc1 or later)

Installation

  1. Clone the repository.

  2. Install the required dependencies using the following command:

    pip install googletrans==4.0.0-rc1

Usage

  1. Open a terminal or command prompt.

  2. Navigate to the directory where the script is located.

  3. Run the script using the following command:

    python language_translator.py
  4. Enter the text you want to translate when prompted.

  5. Enter the target language code (e.g., 'fr' for French, 'es' for Spanish) when prompted. You can refer to the Google Translate language codes for a list of supported languages.

  6. The script will output the translated text.

Example

Here's an example of how to use the translation script:

Enter the text you want to translate: Hello, how are you?
Enter the target language (e.g., 'fr' for French, 'es' for Spanish): es
Translated text: ¡Hola, cómo estás?

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.