Skip to main content

No project description provided

Project description

LOCALTRANS

LOCALTRANS is a library that facilitates local translation by reading previously translated content from a .pyt file for you.

.pyt file structure

Valid Structure

key=value
key =value
key= value
key = value

you can use any delimiter instead of '='

Invalid Structure

keyvalue
key value
key
value
key=
=key
value=
=value

Example .pyt file

hello=merhaba
hello world=merhaba dünya
lorem ipsum is a test text = lorem ipsum bir deneme metnidir

This is a valid .pyt file ( english to turkish )

Usage

pip install localtrans

Basic Usage

from localtrans.translator import Translate

translator = Translate.initialize('/path/to/pyt/files/directory')

# delimiter's default is = so you don't have to add it into parameters
translated = translator.translate(to_lang='fr', text='hello', delimiter='=')

print(translated)

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

localtrans-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

localtrans-0.1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file localtrans-0.1.2.tar.gz.

File metadata

  • Download URL: localtrans-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1025-oem

File hashes

Hashes for localtrans-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2cb52aee8d7ed04ba476b5e8b7fd8040564fd67f7f3f754f39f1d7b41c70b4d4
MD5 d4d8f4cd0737dbf9c11f025371e79313
BLAKE2b-256 e2148ab494161245f361773619275d05cb937a56ee896baa89f33f62d609d7b1

See more details on using hashes here.

File details

Details for the file localtrans-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: localtrans-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1025-oem

File hashes

Hashes for localtrans-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65e94a8a7f5db0185ec808b5c84298c9ee6b16a648f7ae25bb2cc34f7156a0f1
MD5 e7f92746bab6e26adc72cdb4928723d5
BLAKE2b-256 6235605237e4218d20c56c00006fa6aacc183474d0754c617320f5a19eedb1c6

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