@phila/auto-translator-cli
This is in npm at https://www.npmjs.com/package/@phila/auto-translator-cli
This tool will translate all of the keys in a json object into any other languages that Amazon Translate offers.
Setup
Any project that uses it should, by default, have an i18n folder at the location src/i18n:
This location and folder name can be anything, but the cli questions are set to import and export from src/i18n by default
The english file you import can be a .js file, and it should export a JSON object:
This object MUST
- use "" around all keys and values
- not have any trailing commas after the last entry in a nested object
There also needs to be an .env which contains the keys:
AWS_PROFILE_NAME=default
GIT_BRANCH=feature/add-tutorials
ENGLISH_FILENAME=en.js
Installation
To use auto-translator-cli, first install it globally using
npm i -g @phila/auto-translator-cli
Use