1.1.6 • Published 3 years ago

localise-dot-biz v1.1.6

Weekly downloads
2
License
MIT
Repository
gitlab
Last release
3 years ago

Localise.biz language file downloader

Downloads language files from localise.biz

Installation

yarn add localise-dot-biz --dev

or

npm i localise-dot-biz --save-dev

Configuration

Add the following to your package.json

{  
  "i18n": {
    "outDir": "src/i18n",
    "apiKeyEnvVar": "LOCALISE_BIZ_API_KEY",
    "format": "i18next3",
    "generateTSIndex": true,
    "languages": [
      "en-US"
    ]
  }
}

Options

PropertyDescriptionRequiredExample
outDirThe directory that the files will be created intruesrc/i18n
apiKeyEnvVarThe environment variable that you have set your api key tofalseLOCALISE_BIZ_API_KEY
secretConfThe directory that the files will be created infalselocalise-key.json
formatThe localise.biz file format. i18next3 is designed to work with the i18n packagetruei18next3
generateTSIndexWhether or not to generate an index.ts file in the outDir. This is only needed if you are shipping a typescript package. If you don't have this option set your language files will not bin included in the output directory when you compile your typescript files with tscfalsetrue
languagesAn array of languages that your application supports. These must be already configured in localise.biztrue[ "en-US" ]

apiKeyEnvVar

Don't forget to set your API key as an environment variable

export LOCALISE_BIZ_API_KEY=your_api_key_goes_here

secretConf format

If you use a config file to store you api key rather than an environment variable the file should have a property key with your api key

{ 
    "key": "your_api_key_goes_here"
}

If you use this approach you should not commit your api key to your version control repository

1.1.6

3 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago