Automatic PO file translator
Reason this release was yanked:
Have a import error
Project description
translate-po
Simple quick script for automatically translating .po files using Google. It speeds up internationalization by giving translators machine translated base version to correct.
Usage
Installation
pip install django-translate_po
Usage with translate function
from translate_po.translator_functions import select_translator_function
# Can use AWS or Google translate service,
# but if want use AWS service, you must add some settings into django's settings.py file, like this:
AWS_TRANSLATE_SERVICE = {
"service_name": "translate",
"service_region": "us-west-2",
"access_key": "your-access-key",
"access_secret": "your-access_secret"
}
translator_function = select_translator_function("AWS")
# translator_function = select_translator_function("Google")
res_text = translator_function("your-text", source_code="us", target_code="de")
Usage with translate po file
from translate_po.translate import PoTranslator
po_translator = PoTranslator("./a.po", translator_service="AWS", source_code="en", target_code="zh")
po_translator.generate_text_for_untranslated()
Changelog
0.1.0
- Release Django-translate_po
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for Django-translate_po-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74777e7a21664aafb3ee4a5f465d59a4e43d4921559b3d6d3238f9c97b169aaf |
|
MD5 | 4318d1c662f8e1cc87888e2a71fda579 |
|
BLAKE2b-256 | 7845b5eee23c7f15040a3be0b19d27f250ba8935c57f0ea9551081e95ebd0d09 |