Skip to main content

gotranslate

gotranslate is a lightweight Python library built around GoogleTranslator for:

  • text translation
  • language detection
  • language metadata
  • supported languages export in JSON format
  • emoji flags for detected and target languages
  • translation details in a single response

It is designed for developers who want a simple and practical translation library for Python projects and APIs.


Installation

pip install gotranslate

Quick Start

from gtranslate import GoogleTranslator

translator = GoogleTranslator(source="auto", target="fr")
print(translator.translate("Hello world"))
print(translator.detect_language("Hello world"))
print(translator.translate_with_details("Hello world"))

Features

  • Translate text with Google Translate
  • Detect source language automatically
  • Return translation with full metadata
  • Get supported languages as Python dict or JSON
  • Get language details:
    • language name
    • language code
    • emoji flag
  • Get source and target language details together
  • Easy integration with Flask APIs and backend services

Example Output

{
  "text": "Hello world",
  "translation": "Bonjour le monde",
  "source": {
    "language": "English",
    "code": "en",
    "flag": "🇬🇧"
  },
  "target": {
    "language": "French",
    "code": "fr",
    "flag": "🇫🇷"
  }
}

Support This Project

If this project helps you and you want to support its development, you can send a small contribution via PayPal.

PayPal Buy me a coffee with PayPal

PayPal account: andryrlnew@gmail.com

Thank you very much for your support.


Repository

  • Homepage: https://github.com/lantoandryerics/gotranslate
  • Repository: https://github.com/lantoandryerics/gotranslate
  • Issues: https://github.com/lantoandryerics/gotranslate/issues

License

MIT License

Release files for gotranslate 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gotranslate 1.0.0
File Size Uploaded
gotranslate-1.0.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gotranslate 1.0.0
File Interpreter ABI Platform
gotranslate-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / gotranslate-1.0.0.tar.gz

Download URL gotranslate-1.0.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d4e2cd064b172f232af1937d7e86ed1dbcdec8a7f7ac23d9522c68ea22ac9502
BLAKE2b-256 checksum
How to use checksums
7cbbb65b54183f92064c15032f2c41e1e13e2cd028b51bb09aaae0bb34bfb479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / gotranslate-1.0.0-py3-none-any.whl

Download URL gotranslate-1.0.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
469a73acc9c1ab7c6dff0f1876266428a752cad9dd070a1f598f5a07cfa9fb0a
BLAKE2b-256 checksum
How to use checksums
f6f384d78697030719eb11cf60a3fb7e8b8a1d41c577b4791014e12cbb3a3f33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page