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 wantHow
Set the file format instead of inferring itlocaleFileFormat: 'json' or 'php-array'
Restrict or reorder localeslocales
Force this adapterframework: 'laravel'
Locale directories elsewhere entirelylocaleDirs + 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.php is pattern-matched, not evaluated. A locale assembled at runtime, or an env('APP_LOCALE') call with no literal fallback, is invisible and the adapter falls back to en. Declare locales if 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 localeFileFormat if you meant the JSON one.
Copyright © 2026