Return to documentation

Configure Alinea CLI for your project

Options and customization of i18n scan.

Main options
Customizes scan behavior
{
  "entry": "src/app/[locale]/page.tsx",
  "locale": "fr",
  "transformDataStructures": true,
  "transformCode": true,
  "useNextIntl": true,
  "translatableProps": [
    "title",
    "label",
    "category",
    "name",
    "description"
  ],
  "namespaceByPath": [
    { "pattern": "/constants/", "namespace": "Data" },
    { "pattern": "/app/", "namespace": "Common" }
  ]
}
Description of options

entry

Scan entry point (main file)

local

Default locale for translations

transformDataStructures

Transforming Objects and Tables

transformationCode

Inject next-intl into code

useNextIntl

Use next-intl for translations

translatableProps

Props to translate automatically

Namespaces per path

Configure automatic namespaces based on file path:

namespaceByPath: [
  { "pattern": "/constants/", "namespace": "Data" },
  { "pattern": "/app/", "namespace": "Common" },
  { "pattern": "/components/Button", "namespace": "Button" },
  { "pattern": "/components/Form", "namespace": "Form" }
]