https://github.com/gaetansenn/dw-localise
A localise module to synth locale with NuxtJS
https://github.com/gaetansenn/dw-localise
Last synced: 7 days ago
JSON representation
A localise module to synth locale with NuxtJS
- Host: GitHub
- URL: https://github.com/gaetansenn/dw-localise
- Owner: gaetansenn
- License: mit
- Created: 2021-09-02T15:10:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-06T14:11:03.000Z (about 4 years ago)
- Last Synced: 2025-09-15T18:23:42.795Z (26 days ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# dw-localise
A localise module to synth locale with NuxtJS## Install
Add package `yarn add @dewib/dw-localise`
## Usage
Add the module to your `nuxt.config.js`
```js
modules: {
'@dewib/dw-localise'
},// Your localise configuration
localise: {
filter: ['!ios-only,!ios-infoplist,!android-only'],
fallback: 'fr',
locale: 'fr',
token: process.env.LOCO_API_KEY,
path: path.resolve(__dirname, 'static/i18n'),
disabled: process.env.LOCO_DISABLED,
}
```## Config
Localise module handle four parameters.
`filter`: used to filter with tags [see more](https://localise.biz/api/docs/export/exportall#query)
`fallback`: fallback locale for untranslated assets, specified as short code. e.g. en or en_GB [see more](https://localise.biz/api/docs/export/exportall#query)
`locale`: used to handle case you have only one locale and due to lack of informations from localise.
`token`: the localise token to export the locales
`path`: where the locales will be writen
`disabled`: in case you don't need to sync it from localise server