Vue
Your locale directories come from the include option of @intlify/unplugin-vue-i18n in your vite.config.{ts,js,mts,mjs}, which the adapter executes to read. Without that plugin it falls back to convention: src/locales, locales, src/i18n/locales, i18n/locales, src/plugins/i18n/locales or src/i18n, first match wins. Locales are the .json file names across every directory found.
A layer is a scoped locale directory — a Nuxt layer, a workspace package, a shared UI library, or one app in a monorepo. One locale directory is a single layer named root; several include roots are one layer per directory, named after it.
A Nuxt app is never a Vue app here: a project carrying nuxt, @nuxt/kit or a nuxt.config belongs to the Nuxt adapter.
Set a Default Locale
Nothing in a Vue SPA states which locale is the source. Undeclared, the default is the first locale code in sorted order — the alphabet, not a decision, and silent: de beats en in a {de,en,fr}.json project. One line removes the guess:
import { defineI18nKitConfig } from '@the-i18n-kit/cli/config'
export default defineI18nKitConfig({
defaultLocale: 'en',
})
Overrides
| What you want | How |
|---|---|
| Set the default locale | defaultLocale — always wins over discovery |
| Restrict or reorder locales | locales |
| Force this adapter | framework: 'vue' |
| Name the directories yourself | localeDirs + defaultLocale, which hands the project to the generic adapter |
Limits
- A
vite.config.tsthat throws is a warning, not a failure. A missing plugin or an absent environment variable drops resolution back to the conventional directories above, so check the warning if the wrong directory turns up. - Config answers are cached per process. Editing
vite.config.tsduring a long-running MCP session does not change the answer; restart it. - A messages path assembled from variables is not seen. Declare
localeDirswhen yours is computed rather than written as a literal.