Auto-input po-style translation files using Google Translate API.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2a6f668 Oct 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img Add README Oct 29, 2018
.gitignore Add translation cache Oct 28, 2018
README.md Add README Oct 29, 2018
translate_po.py Add README Oct 29, 2018

README.md

google-translate-po

Auto-input po-style translation files using Google Translate API.

screenshot

See PR: Translate into English using Google Translate API - c-bata/webframework-in-python or my Japanese blog article.

Setup

This requires Python3 and google-cloud-translate library.

$ pip install --upgrade google-cloud-translate
$ export GOOGLE_SERVICE_ACCOUNT_JSON=/path/to/service-account-credential.json

Usage

$ python translate_po.py --help
usage: translate_po.py [-h] [--lang LANG] [--currency CURRENCY] filepath

positional arguments:
  filepath

optional arguments:
  -h, --help           show this help message and exit
  --lang LANG          target language (default: "ja")
  --currency CURRENCY  dollar per your currency. (default currency is yen: 111.90)

LICENSE

MIT License.