Detection
Point the CLI at a directory and it picks an adapter: the per-framework logic that finds your locale directories and reports your locales, your default locale and your layers. Four ship — nuxt, laravel, react and generic, which also resolves Vue SPAs and anything else whose locale directories you can name.
A layer is a scoped locale directory — a Nuxt layer, a workspace package, a shared UI library, or one app in a monorepo.
Declaring the Paths Settles It
Declare both localeDirs and defaultLocale in your kit config and the generic adapter resolves the project, whatever the dependency list says. If you write down where your locale files are, that is where they are.
Forcing an Adapter
Set framework to nuxt, laravel, react or generic and detection is skipped. Reach for it when one checkout carries signals for two frameworks — a Laravel backend with a Vue frontend is the common case.
import { defineI18nKitConfig } from '@the-i18n-kit/cli/config'
export default defineI18nKitConfig({
framework: 'generic',
localeDirs: ['resources/js/locales'],
defaultLocale: 'en',
})
The same key works in .i18n-mcp.json. A name matching no adapter fails with an error listing the ones that exist, except vue, which is accepted as an alias for generic and warns on stderr.
Seeing the Decision
the-i18n-cli discover prints the resolved configuration, with the adapter name under framework. the-i18n-cli init reports which adapter matched. Both take --projectDir (-d) to point somewhere other than the working directory.
When the wrong adapter resolves your project, framework is the fix — the choice is not otherwise tunable.