- Python 3.6+
pip install basalam.backbone-translationfrom backbone_translation.translator import Translator
translator = Translator({
"messages.greeting" : "Bonjour {name}"
})
# OR translator = Translator.from_json_file("path_to_json_file")
translator.translate("messages.greeting", name="Mojtabaa")
# Bonjour Mojtabaa# install pytest
pip install pytest
# run tests
python -m pytest- 0.0.2 added from_json_file method
- 0.0.3 Now build and push are done using gitlab-ci
- 0.0.4 new
exists(phrase: str) -> boolmethod - 0.1.0 added utf-8 encoding thanks to alimohammayali@gmail.com