Frameworks

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:

i18n-kit.config.ts
import { defineI18nKitConfig } from '@the-i18n-kit/cli/config'

export default defineI18nKitConfig({
  defaultLocale: 'en',
})

Overrides

What you wantHow
Set the default localedefaultLocale — always wins over discovery
Restrict or reorder localeslocales
Force this adapterframework: 'vue'
Name the directories yourselflocaleDirs + defaultLocale, which hands the project to the generic adapter

Limits

  • A vite.config.ts that 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.ts during a long-running MCP session does not change the answer; restart it.
  • A messages path assembled from variables is not seen. Declare localeDirs when yours is computed rather than written as a literal.
Copyright © 2026