Zurück zur Dokumentation
Alinea CLI für Ihr Projekt konfigurieren
Optionen und Anpassung des i18n Scans.
Hauptoptionen
Anpassen des Scanverhaltens
{
"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" }
]
}Beschreibung der Optionen
eingang
Scan-Einstiegspunkt (Hauptdatei)
lokal
Default locale für Übersetzungen
transformDataStructures
Transforming Objects und Tables
transformationCode
Next-intl in den Code einfügen
useNextIntl
Verwenden Sie next-intl für Übersetzungen
translatableProps
Requisiten automatisch übersetzen
Namespaces pro Pfad
Konfigurieren Sie automatische Namespaces basierend auf dem Dateipfad:
namespaceByPath: [
{ "pattern": "/constants/", "namespace": "Data" },
{ "pattern": "/app/", "namespace": "Common" },
{ "pattern": "/components/Button", "namespace": "Button" },
{ "pattern": "/components/Form", "namespace": "Form" }
]