Translate your translation files
Project description
Installation
pip install geranslator
Configuration
geranslator/config.yml
geranslator:
lang_dir: lang
lang_files_ext: json
provider: google
origin_lang: en
to_langs:
- en
- fr
- ar
- lang_dir: Where your translation files live.
- lang_files_ext: Your translation files extension.
- provider: Provider you want to translate your file.
- origin_lang: The origin language you already have.
- to_langs: Languages you want your file to get translated to.
supported extensions: json
supported providers: google
Usage
This will use the configuration as default
from geranslator import Geranslator
Geranslator().translate()
You can customize it using the following methods. 😃
from geranslator import Geranslator
geranslator = Geranslator()
geranslator.set_lang_dir('translation')
geranslator.set_origin_lang('en')
geranslator.set_target_lang(['ar', 'fr'])
geranslator.set_lang_files_extension('json')
geranslator.translate()
You can chain them too 😮
from geranslator import Geranslator
Geranslator().set_lang_dir('translation').set_origin_lang('en').set_target_lang(['ar', 'fr']).set_lang_files_extension('json').translate()
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
geranslator-0.1.0.tar.gz
(7.3 kB
view hashes)
Built Distribution
Close
Hashes for geranslator-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 924867e31a85474f42e34693335d8c3fbbe7d41cf688eb373a5ec8aad5521ef0 |
|
MD5 | e2f596ae93d33e91e407c9b5b302f6b4 |
|
BLAKE2b-256 | 9d5956cabfe314d67d3d6722cdb572c006a8dacfe649705a7a046c0295eb25a4 |