node-smartling
v0.3.0
Published
A library providing utility tools to work with Smartling V2 API.
Downloads
3
Readme
Node Smartling
A library providing utility tools to work with Smartling V2 API.
Installation
npm i node-smartling -S
or yarn add node-smartling
Usage
First configure the environment variable (or .env) with following fields:
SMARTLING_USER=YOUR_SMARTLING_USER_NAME
SMARTLING_SECRET=YOUR_SMARTLING_SECRET
PROJECT_ID=YOUR_PROJECT_ID
You can find how to obtain these on Smartling API
And also
DROP_LOCATION=C:\PATH\TO\RESOURCE\i18n.json
FILE_URI=en-GB.json (optional)
FILE_PATH=PATH\TO\FILE_URI (optional)
CSV_FOLDER=csv/ (optional) TRANSLATION_LOCALE=zh-CN (optional)
Use smartling.download
to get the latest translations from Smartling, drop into your project
const smartling = require('node-smartling')
smartling.download().then(...) // Or await smartling.download()
Use smartling.upload
to merge your csv and upload them as single json (with FILE_URI as name) to Smartling for translation (You need to drop the files into 'csv' folder)
const smartling = require('node-smartling')
smartling.upload().then(...) // Or await smartling.upload()
Release History
- 0.1.0 Initial release
- 0.2.0 Make file path configurable
- 0.3.0 Make language configurable, update README