Skip to content

Script to translate data and metadata of a dataset using Google Cloud Translation API and Luzmo

Notifications You must be signed in to change notification settings

luzmo-official/dataset-translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dataset translation with Google Cloud Translation API

Code to programmatically translate data and metadata of a dataset to a language of choice using Google Cloud Translation API and Luzmo.

Usage

To use this project, follow these steps:

  1. Clone the repository to your local machine.
  2. Create an .env file containing a the following info:
    LUZMO_KEY=<the luzmo api key>
    LUZMO_TOKEN=<the luzmo api token>
  3. 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
  4. Install the dependencies by running npm install.
  5. Adapt the necessary variables (dataset id and column ids) in the index js file to have it work for your case
  6. Run it using: npm run translate-dataset.

Dependencies

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

About

Script to translate data and metadata of a dataset using Google Cloud Translation API and Luzmo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published