Skip to main content

GoogleTranslator-based Python library for translation, language detection, flags, and language metadata.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gotranslate-1.0.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gotranslate-1.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file gotranslate-1.0.0.tar.gz.

File metadata

  • Download URL: gotranslate-1.0.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gotranslate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d4e2cd064b172f232af1937d7e86ed1dbcdec8a7f7ac23d9522c68ea22ac9502
MD5 287ad9aa11f78e3a3d002f357850eef0
BLAKE2b-256 7cbbb65b54183f92064c15032f2c41e1e13e2cd028b51bb09aaae0bb34bfb479

See more details on using hashes here.

File details

Details for the file gotranslate-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gotranslate-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gotranslate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 469a73acc9c1ab7c6dff0f1876266428a752cad9dd070a1f598f5a07cfa9fb0a
MD5 8bae30c0cf2446903a169ecc417d0f51
BLAKE2b-256 f6f384d78697030719eb11cf60a3fb7e8b8a1d41c577b4791014e12cbb3a3f33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page