Code to programmatically translate data and metadata of a dataset to a language of choice using Google Cloud Translation API and Luzmo.
To use this project, follow these steps:
- Clone the repository to your local machine.
- Create an
.env
file containing a the following info:
LUZMO_KEY=<the luzmo api key>
LUZMO_TOKEN=<the luzmo api token>
- Add a
translation-api-credentials.json
file in the root directory which contains the google service account credentials with which you can use the translate - Install the dependencies by running
npm install
. - Adapt the necessary variables (
dataset id
andcolumn ids
) in the index js file to have it work for your case - Run it using:
npm run translate-dataset
.
This project has the following dependencies:
@luzmo/nodejs-sdk
: Used to fetch the dataset and columns.dotenv
: loads environment variable@google-cloud/translate
: translate using the google translate api