https://github.com/meedan/i18n-translate-json
npm module that automatically translates node-i18n JSON files
https://github.com/meedan/i18n-translate-json
google-translate i18n nodejs
Last synced: 6 months ago
JSON representation
npm module that automatically translates node-i18n JSON files
- Host: GitHub
- URL: https://github.com/meedan/i18n-translate-json
- Owner: meedan
- License: gpl-2.0
- Created: 2017-05-03T22:25:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-18T11:27:50.000Z (about 3 years ago)
- Last Synced: 2025-11-24T06:13:10.028Z (8 months ago)
- Topics: google-translate, i18n, nodejs
- Language: JavaScript
- Homepage:
- Size: 119 KB
- Stars: 38
- Watchers: 4
- Forks: 16
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# i18n-translate-json
Automatically translates node-i18n JSON files into different languages via Google Translate API.
## Installation
```
npm install -g i18n-translate-json
```
## Usage
You need a [Google Translate API Key](https://cloud.google.com/translate/).
```
i18n-translate-json apiKey dir sourceLang (targetLang1,targetLang2,..)
```
e.g.
```
i18n-translate-json iuOHAEbo9H788d34h93h4diouehIUHI locale/ en es,fr
```
This would translate all strings in `locale/en.json` (relative to current folder in the shell) from English to Spanish and French, based on the Google Translate API language codes.
The target languages list is optional. When not present, it will be translated to all languages supported by Google Translate.
## Credits
Based on [i18n-translate](https://github.com/thomasbrueggemann/i18n-translate) by Thomas Brüggemann.
This fork is sponsored by [Meedan](http://meedan.com).