google-sheets-i18n-to-json
v1.0.3
Published
Assuming the template, will extract google sheets data to json files for I18N use.
Downloads
36
Maintainers
Readme
Google Sheets I18N To JSON

Google Sheets I18N To JSON is a command line tool to help pull google sheets as JSON objects for I18N use.
The idea is that you have a google spreadsheet where you have a google spreadsheet to maintain a reference of keys to text corresponding to the language. This way both developers and clients can be on the same track with official texts for a product.
After updating the spreadsheet, the developer would want to update the JSON objects as easy as running:
foo@bar:~$ google-sheets-i18n-to-json updateThere are a short number of easy steps that the command line tool guides you to making the spreadsheet, authorizing and pulling the JSON objects. Check out the website to get a thorough and proper understanding of the command line tool.
Website: https://google-sheets-i18n-to-json.netlify.app
Getting-Started: https://google-sheets-i18n-to-json.netlify.app/getting-started
Example of Use Case
The command line tool creates a spreadsheet like this after initializing:
After initializing, the JSON objects will be pulled at first. However, say you or your team or your clients add a new key "Bye" and fill in the text in the corresponding locales. Simply run:
foo@bar:~$ google-sheets-i18n-to-json updateto get the following:
Short README of functions
Commands:
- Installing
- Initialization
- Authorizing
- Pulling JSON Objects
- Adding languages
- Deleting language
- Cleaning and removing files
Installation
Using npm:
foo@bar:~$ npm install -g google-sheets-i18n-to-jsonUsing yarn:
foo@bar:~$ yarn global add google-sheets-i18n-to-jsonUsing
Since google-sheets-i18n-to-json is long, you can use the following as a short form:
foo@bar:~$ gs-i18n-jsonAlternatively, the long version would still work.
Initialization
Normal Initialization
Follow the steps to generate a spreadsheet after entering the command:
foo@bar:~$ gs-i18n-json initLinking Initialization
Follow the steps to link a spreadsheet after entering the command:
foo@bar:~$ gs-i18n-json linkLinking New Initialization
Follow the steps to link a spreadsheet and create a new sheet inside after entering the command:
foo@bar:~$ gs-i18n-json link-newAuthorizing
Generates a token to perform actions. Initialization already includes this.
foo@bar:~$ gs-i18n-json authorizeGet the date of when the token was generated:
foo@bar:~$ gs-i18n-json token-dateUpdating JSON Objects
foo@bar:~$ gs-i18n-json updateAdding languages to spreadsheet
foo@bar:~$ gs-i18n-json add-lang --lang language_1Deleting languages from spreadsheet
foo@bar:~$ gs-i18n-json delete-lang --lang language_1Cleaning files
foo@bar:~$ gs-i18n-json cleanAlso remove config:
foo@bar:~$ gs-i18n-json clean --config