Skip to main content

A python package that translate text and files

Project description

pytranslater

A Python package that translates text and files into 100+ languages.

Installation

pip install pytranslater

Usage

In Python

from pytranslater import translate_text, translate_file, translator_languages

# Translate text to any language
translate_text("Hello", "de")      # → Hallo (German)
translate_text("Hello", "ar")      # → مرحبا (Arabic)
translate_text("Hello", "ja")      # → こんにちは (Japanese)

# Translate a file
translate_file("notes.txt", "de")  # → notes.txt_translated.txt (German)
translate_file("story.txt", "ar")  # → story.txt_translated.txt (Arabic)

# Show all available languages
translator_languages()             # Lists all 100+ language codes

From Command Line (Terminal)

# Translate text
pytranslater text "Hello World" de
pytranslater text "Good morning" ar

# Translate a file
pytranslater file notes.txt de
pytranslater file story.txt ja

# Show all languages
pytranslater languages

Features

  • Translate to 100+ languages
  • Translate entire files with encoding support
  • Command-line interface
  • Built-in language list
  • Simple and fast

Project details


Release history Release notifications | RSS feed

This version

0.7

Download files

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

Source Distribution

pytranslater-0.7.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

pytranslater-0.7-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pytranslater-0.7.tar.gz.

File metadata

  • Download URL: pytranslater-0.7.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for pytranslater-0.7.tar.gz
Algorithm Hash digest
SHA256 cee0c67d7f4dc6af8b3a29d9d1ad7bdccde227e9d7ee4a48896f20a62bd0a285
MD5 0686e3b51b11ec976d36801151572528
BLAKE2b-256 268c14651fc769c7f9ea92a85bf02f995cef5ce136fd260e7d35c28311f0d251

See more details on using hashes here.

File details

Details for the file pytranslater-0.7-py3-none-any.whl.

File metadata

  • Download URL: pytranslater-0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for pytranslater-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a58934f2674ac4dd1e4c3e14ff82b06891658e2110241c1acf8e04d68051709b
MD5 0f7328116f924afeb140b1da107646a3
BLAKE2b-256 1ec2ddda86208c6697a777c5793d0e40bc7fd1eca377b1d8d78c7e9453d9480a

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