Skip to main content

google-translate-unofficial (Python)

Unofficial Google Translate for Python - no API key required.

Installation

pip3 install --upgrade google-translate-unofficial

Usage

from google_translate_unofficial import translate, translate_batch, get_languages

Translate a string

from google_translate_unofficial import translate

translate("Hello world", target="es")
# "Hola mundo"

translate("Bonjour", target="en", source="fr")
# "Hello"

translate("こんにちは", target="de")
# "Hallo"

The source parameter defaults to "auto", letting Google detect the language automatically. Languages can be passed as full names or ISO codes interchangeably.

translate("Hello", target="spanish")
translate("Hello", target="es")
# both return "Hola"

Translate a batch

from google_translate_unofficial import translate_batch

translate_batch(["cat", "dog", "house"], target="fr")
# ["chat", "chien", "maison"]

Get supported languages

from google_translate_unofficial import get_languages

get_languages()
# ["afrikaans", "albanian", "amharic", ...]

get_languages(as_dict=True)
# {"afrikaans": "af", "albanian": "sq", "amharic": "am", ...}

Notes

  • The maximum safe input length is around 5000 characters per call.
  • If you translate large batches in a tight loop you may hit rate limits. Add a small delay between calls if needed.

Metadata

Release files for google-translate-unofficial 1.0.2

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

Source distribution (sdist)

Source distribution for google-translate-unofficial 1.0.2
File Size Uploaded Provenance Actions
google_translate_unofficial-1.0.2.tar.gz 5.3 kB Without provenance Details for google_translate_unofficial-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for google-translate-unofficial 1.0.2
File Interpreter ABI Platform Actions
google_translate_unofficial-1.0.2-py3-none-any.whl Python 3 none any Details for google_translate_unofficial-1.0.2-py3-none-any.whl

Total release size: 11.0 kB

Release files / google_translate_unofficial-1.0.2.tar.gz

Download URL google_translate_unofficial-1.0.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c8dcd3ab5e61aa568fc1d8f086399cbeeccdb359ee2c1a14c7f782e1fb176f9b
BLAKE2b-256 checksum
How to use checksums
d64f8cdd564d4738c687a0208e9b888bde4220ed6a45638565baf553df71ac0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / google_translate_unofficial-1.0.2-py3-none-any.whl

Download URL google_translate_unofficial-1.0.2-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d656c70cd774b80883dc8cc0a5813b99f1335918f4781dc3b5d0dcc7bcc4755
BLAKE2b-256 checksum
How to use checksums
0209da042f52221cb76454094c800f3a8f053348e6ff10e80e21014557de0ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for google-translate-unofficial 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

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