1.1.3 • Published 5 months ago

i18n-spreadsheet-generator v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

i18n Spreadsheet Generator

Generate Localizations

Environment Setup

A Config args needs to be passed on function generateLocalization.

  • sheetId the Google Sheet ID (from the url in the browser), example: 1qGpJl7qm0igCM4GE4IRlQf9eyStfSNZ7e26pYN0adRA.
  • GOOGLE_SERVICE_ACCOUNT_EMAIL your google service account, example: xxx@xxx.iam.gserviceaccount.com
  • GOOGLE_PRIVATE_KEY is the Service Account private key (starting with -----BEGIN PRIVATE KEY...). Make sure to wrap the content in double quotes (") so that newlines (\n) are properly parsed
  • sheetIndex the Google Sheet Index in the Spreadsheet, example: 0 (first index).
  • enableDefaultLocalization default value false, if true the other empty language's text will use English's text.
  • sheetType the Google Sheet Type (Type-Language or Type-Country) in the Spreadsheet, see in the example Spreadsheet above. There are 2 kinds of the Sheet Type. Generated Results:

    • Type-Language: { "en": { "SAMPLE_KEY": "TEXT_EN" }, "bg": { "SAMPLE_KEY": "TEXT_BG" } ... }

    • Type-Country: { "be": { "en": { "SAMPLE_KEY": "TEXT_EN" }, "nl": { "SAMPLE_KEY": "TEXT_BG" }, "fr": { "SAMPLE_KEY": "TEXT_BG" } } ... }

Generate Localizations Test

  • Run test example Generator.test.ts with script npm run test
1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.11

9 months ago

1.0.12

9 months ago

1.0.10

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago