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)
Metadata
Release files for localtrans 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| localtrans-0.1.2.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| localtrans-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / localtrans-0.1.2.tar.gz
| Download URL | localtrans-0.1.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cb52aee8d7ed04ba476b5e8b7fd8040564fd67f7f3f754f39f1d7b41c70b4d4
|
|
BLAKE2b-256 checksum How to use checksums |
e2148ab494161245f361773619275d05cb937a56ee896baa89f33f62d609d7b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1025-oem
|
Release files / localtrans-0.1.2-py3-none-any.whl
| Download URL | localtrans-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65e94a8a7f5db0185ec808b5c84298c9ee6b16a648f7ae25bb2cc34f7156a0f1
|
|
BLAKE2b-256 checksum How to use checksums |
6235605237e4218d20c56c00006fa6aacc183474d0754c617320f5a19eedb1c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1025-oem
|