Skip to content

leeyunjai/googletrans-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Translate API for Python

This is a Python library that provides an interface to the Google Translate API.

Installation

You can install this library using pip:

pip3 install googletrans-python

Usage

translate(TEXT, target_language_code)

https://www.labnol.org/code/19899-google-translate-languages

import googletrans as gt

# Translate text from English to Korean
print(gt.translate("Hello, How are you?", "ko"))

# Translate text from English to Japanese
print(gt.translate("Hello, How are you?", "ja"))

# Translate text from English to French
print(gt.translate("Hello, How are you?", "fr"))
안녕하세요. 어떻게 지내세요?
こんにちは元気ですか?
Bonjour comment allez-vous?

unofficial