Get started
Let's get started with nuxt-loco.
- Install the dependencies in your Nuxt project:
npx nuxi@latest module add nuxt-loco
- Configure your
nuxt.config.ts
to load the module
nuxt.config.ts
import { defineNuxtConfig } from 'nuxt/config'// https://nuxt.com/docs/guide/directory-structure/nuxt.config#nuxt-config-fileexport default defineNuxtConfig({ ... modules: [ 'nuxt-loco', ],})
- Parameters
You can customize the parameters of the module by providing the loco
key from your nuxt.config.ts
Key | Type | Required | Description |
---|---|---|---|
token | string | true | The localise token to export the locales |
path | Boolean | true | Where the locales will be writen |
locale | string | false | used to handle case you have only one locale and due to lack of informatiom from localise. |
fallback | Boolean | false | Fallback locale for untranslated assets, specified as short code. e.g. en or en_GB see more |
disabled | Boolean | false | in case you don't need to sync it from localise server |