
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
google-sheets-translate
Advanced tools
Maintain your translations in Google Sheets and fetch them into JSON files
Maintain your translations in Google Sheets and fetch them into JSON files - ready to be used other translation libraries like Globalize
Steps to get started with Google documents. See more verbose version in related project: https://github.com/SC5/google-sheets-api
NOTE: Authentication is required - link based sharing is not currently supported.
Example document:

Example code:
var fs = require('fs');
var GoogleSheetsTranslate = require('google-sheets-translate');
var gtranslator = new GoogleSheetsTranslate({
documentId: 'your-document-id',
serviceEmail: 'your-generated-service-email@developer.gserviceaccount.com',
serviceKey: fs.readFileSync('./your-service.pem').toString()
});
var output;
gtranslator.getTranslations()
.then(function(translations) {
translations.forEach(function(translation, locale) {
// In this example we're writing files in Globalize compatible format
output = {};
output[locale] = translation;
fs.writeFileSync(
'messages/' + locale + '.json',
JSON.stringify(output, null, 2)
);
});
})
.catch(function(err) {
console.warn('Failed to generate translations:', err);
});
Example output:
{
"en": {
"translation": "Translation",
"dog-house": "Doghouse",
"sister": "Sister"
}
}
{
"fi": {
"translation": "Käännös",
"dog-house": "Koirankoppi",
"sister": "Sisko"
}
}
Create an instance from the client. All the options are required.
Retrieve the translations from the sheet. All the options are optional.
Module is MIT -licensed
Module is backed by Nordcloud
FAQs
Maintain your translations in Google Sheets and fetch them into JSON files
We found that google-sheets-translate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.