Frameworks
Laravel
Your translations come from lang/, or resources/lang/ on Laravel 8 and earlier — whichever exists. Both layouts are read: PHP arrays per namespace (lang/en/messages.php) and flat JSON (lang/en.json). If neither directory exists, the command fails naming both paths.
The default and fallback locale come from config/app.php. Both 'locale' => 'de' and 'locale' => env('APP_LOCALE', 'de') are understood; in the env() form the fallback argument is taken.
A layer is a scoped locale directory — a Nuxt layer, a workspace package, a shared UI library, or one app in a monorepo. A Laravel project resolves as a single layer named root.
Overrides
| What you want | How |
|---|---|
| Set the file format instead of inferring it | localeFileFormat: 'json' or 'php-array' |
| Restrict or reorder locales | locales |
| Force this adapter | framework: 'laravel' |
| Locale directories elsewhere entirely | localeDirs + defaultLocale, which hands the project to the generic adapter |
.i18n-mcp.json
{
"framework": "laravel",
"localeFileFormat": "json",
"locales": ["en", "de", "nl"]
}
defaultLocale in your kit config is ignored here — the default locale comes from config/app.php. Declaring localeDirs and defaultLocale together is a different thing: it hands the project to the generic adapter entirely.Limits
config/app.phpis pattern-matched, not evaluated. A locale assembled at runtime, or anenv('APP_LOCALE')call with no literal fallback, is invisible and the adapter falls back toen. Declarelocalesif the list matters.- Only one lang directory is used. Translations split across several packages need the generic adapter, where each path carries its own layer name.
- Where both file layouts exist, PHP arrays win. Set
localeFileFormatif you meant the JSON one.