https://github.com/c-bata/google-translate-po
Auto-input po-style translation files using Google Translate API.
https://github.com/c-bata/google-translate-po
Last synced: over 1 year ago
JSON representation
Auto-input po-style translation files using Google Translate API.
- Host: GitHub
- URL: https://github.com/c-bata/google-translate-po
- Owner: c-bata
- Created: 2018-10-28T10:56:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-29T04:49:49.000Z (over 7 years ago)
- Last Synced: 2025-02-28T05:57:36.904Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 1.82 MB
- Stars: 5
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# google-translate-po
Auto-input po-style translation files using Google Translate API.

See [PR: Translate into English using Google Translate API - c-bata/webframework-in-python](https://github.com/c-bata/webframework-in-python/pull/13)
or [my Japanese blog article](https://nwpct1.hatenablog.com/entry/google-translate-sphinx-project).
## Setup
This requires Python3 and `google-cloud-translate` library.
```console
$ pip install --upgrade google-cloud-translate
$ export GOOGLE_SERVICE_ACCOUNT_JSON=/path/to/service-account-credential.json
```
## Usage
```console
$ 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.