@intlayer/docs 7.5.10 → 7.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/intlayer_with_i18next.md +0 -2
- package/blog/ar/intlayer_with_next-i18next.md +0 -2
- package/blog/ar/intlayer_with_react-i18next.md +0 -2
- package/blog/de/intlayer_with_i18next.md +0 -45
- package/blog/de/intlayer_with_next-i18next.md +0 -46
- package/blog/de/intlayer_with_react-i18next.md +0 -2
- package/blog/en/intlayer_with_i18next.md +0 -46
- package/blog/en/intlayer_with_next-i18next.md +0 -48
- package/blog/en/intlayer_with_next-intl.md +0 -44
- package/blog/en/intlayer_with_react-i18next.md +0 -44
- package/blog/en/intlayer_with_react-intl.md +0 -42
- package/blog/en/intlayer_with_vue-i18n.md +0 -44
- package/blog/en-GB/intlayer_with_i18next.md +0 -45
- package/blog/en-GB/intlayer_with_next-i18next.md +0 -47
- package/blog/en-GB/intlayer_with_next-intl.md +0 -42
- package/blog/en-GB/intlayer_with_react-i18next.md +0 -43
- package/blog/en-GB/intlayer_with_react-intl.md +0 -42
- package/blog/en-GB/intlayer_with_vue-i18n.md +0 -46
- package/blog/es/intlayer_with_i18next.md +0 -45
- package/blog/es/intlayer_with_next-i18next.md +0 -47
- package/blog/es/intlayer_with_next-intl.md +0 -42
- package/blog/es/intlayer_with_react-i18next.md +0 -43
- package/blog/es/intlayer_with_react-intl.md +0 -42
- package/blog/es/intlayer_with_vue-i18n.md +0 -46
- package/blog/fr/intlayer_with_i18next.md +0 -45
- package/blog/fr/intlayer_with_next-i18next.md +0 -47
- package/blog/fr/intlayer_with_next-intl.md +0 -42
- package/blog/fr/intlayer_with_react-i18next.md +0 -43
- package/blog/fr/intlayer_with_react-intl.md +0 -42
- package/blog/fr/intlayer_with_vue-i18n.md +0 -46
- package/blog/hi/intlayer_with_i18next.md +0 -2
- package/blog/hi/intlayer_with_next-i18next.md +0 -2
- package/blog/hi/intlayer_with_react-i18next.md +0 -2
- package/blog/id/intlayer_with_i18next.md +0 -2
- package/blog/id/intlayer_with_next-i18next.md +0 -2
- package/blog/id/intlayer_with_react-i18next.md +0 -2
- package/blog/it/intlayer_with_i18next.md +0 -2
- package/blog/it/intlayer_with_next-i18next.md +0 -2
- package/blog/it/intlayer_with_react-i18next.md +0 -2
- package/blog/ja/intlayer_with_i18next.md +0 -45
- package/blog/ja/intlayer_with_next-i18next.md +0 -46
- package/blog/ja/intlayer_with_next-intl.md +0 -42
- package/blog/ja/intlayer_with_react-i18next.md +0 -42
- package/blog/ja/intlayer_with_react-intl.md +0 -42
- package/blog/ja/intlayer_with_vue-i18n.md +0 -46
- package/blog/ko/intlayer_with_i18next.md +0 -2
- package/blog/ko/intlayer_with_next-i18next.md +0 -2
- package/blog/ko/intlayer_with_react-i18next.md +0 -1
- package/blog/pl/intlayer_with_i18next.md +0 -45
- package/blog/pl/intlayer_with_next-i18next.md +0 -46
- package/blog/pl/intlayer_with_next-intl.md +0 -42
- package/blog/pl/intlayer_with_react-i18next.md +0 -43
- package/blog/pl/intlayer_with_react-intl.md +0 -42
- package/blog/pl/intlayer_with_vue-i18n.md +0 -46
- package/blog/pt/intlayer_with_i18next.md +0 -2
- package/blog/pt/intlayer_with_next-i18next.md +0 -2
- package/blog/pt/intlayer_with_react-i18next.md +0 -2
- package/blog/ru/intlayer_with_i18next.md +0 -45
- package/blog/ru/intlayer_with_next-i18next.md +0 -47
- package/blog/ru/intlayer_with_next-intl.md +0 -42
- package/blog/ru/intlayer_with_react-i18next.md +0 -43
- package/blog/ru/intlayer_with_react-intl.md +0 -42
- package/blog/ru/intlayer_with_vue-i18n.md +0 -46
- package/blog/tr/intlayer_with_i18next.md +0 -2
- package/blog/tr/intlayer_with_next-i18next.md +0 -1
- package/blog/tr/intlayer_with_react-i18next.md +0 -2
- package/blog/vi/intlayer_with_i18next.md +0 -2
- package/blog/vi/intlayer_with_next-i18next.md +0 -2
- package/blog/vi/intlayer_with_react-i18next.md +0 -2
- package/blog/zh/intlayer_with_i18next.md +0 -2
- package/blog/zh/intlayer_with_next-i18next.md +0 -2
- package/blog/zh/intlayer_with_react-i18next.md +0 -2
- package/blog/zh/intlayer_with_vue-i18n.md +0 -46
- package/dist/cjs/generated/blog.entry.cjs +58 -29
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +254 -97
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +30 -15
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +4 -2
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +58 -29
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +254 -97
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +30 -15
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +4 -2
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +3 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/dist/types/generated/legal.entry.d.ts.map +1 -1
- package/docs/ar/cli/ci.md +137 -0
- package/docs/ar/cli/index.md +7 -1
- package/docs/ar/cli/list.md +39 -2
- package/docs/ar/cli/list_projects.md +131 -0
- package/docs/ar/intlayer_CMS.md +20 -0
- package/docs/ar/intlayer_with_next-i18next.md +0 -1
- package/docs/ar/intlayer_with_nextjs_14.md +28 -0
- package/docs/ar/intlayer_with_nextjs_15.md +28 -0
- package/docs/ar/intlayer_with_nextjs_16.md +28 -0
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +1159 -0
- package/docs/ar/plugins/sync-json.md +6 -2
- package/docs/de/cli/ci.md +137 -0
- package/docs/de/cli/index.md +7 -1
- package/docs/de/cli/list.md +39 -2
- package/docs/de/cli/list_projects.md +130 -0
- package/docs/de/intlayer_CMS.md +20 -0
- package/docs/de/intlayer_with_next-i18next.md +0 -1
- package/docs/de/intlayer_with_nextjs_14.md +28 -0
- package/docs/de/intlayer_with_nextjs_15.md +28 -0
- package/docs/de/intlayer_with_nextjs_16.md +28 -0
- package/docs/de/intlayer_with_nextjs_no_locale_path.md +1152 -0
- package/docs/de/plugins/sync-json.md +6 -2
- package/docs/en/cli/ci.md +137 -0
- package/docs/en/cli/index.md +14 -1
- package/docs/en/cli/list.md +39 -2
- package/docs/en/cli/list_projects.md +128 -0
- package/docs/en/interest_of_intlayer.md +1 -1
- package/docs/en/intlayer_CMS.md +20 -0
- package/docs/en/intlayer_with_next-i18next.md +0 -1
- package/docs/en/intlayer_with_nextjs_14.md +28 -0
- package/docs/en/intlayer_with_nextjs_15.md +28 -0
- package/docs/en/intlayer_with_nextjs_16.md +31 -1
- package/docs/en/intlayer_with_nextjs_no_locale_path.md +1132 -0
- package/docs/en/plugins/sync-json.md +6 -2
- package/docs/en-GB/cli/ci.md +137 -0
- package/docs/en-GB/cli/index.md +7 -1
- package/docs/en-GB/cli/list.md +39 -2
- package/docs/en-GB/cli/list_projects.md +130 -0
- package/docs/en-GB/intlayer_CMS.md +20 -0
- package/docs/en-GB/intlayer_with_next-i18next.md +0 -1
- package/docs/en-GB/intlayer_with_nextjs_14.md +28 -0
- package/docs/en-GB/intlayer_with_nextjs_15.md +28 -0
- package/docs/en-GB/intlayer_with_nextjs_16.md +28 -0
- package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +1154 -0
- package/docs/en-GB/plugins/sync-json.md +6 -2
- package/docs/es/cli/ci.md +137 -0
- package/docs/es/cli/index.md +7 -1
- package/docs/es/cli/list.md +39 -2
- package/docs/es/cli/list_projects.md +130 -0
- package/docs/es/intlayer_CMS.md +20 -0
- package/docs/es/intlayer_with_next-i18next.md +0 -1
- package/docs/es/intlayer_with_nextjs_14.md +28 -0
- package/docs/es/intlayer_with_nextjs_15.md +28 -0
- package/docs/es/intlayer_with_nextjs_16.md +28 -0
- package/docs/es/intlayer_with_nextjs_no_locale_path.md +1143 -0
- package/docs/es/plugins/sync-json.md +6 -2
- package/docs/fr/cli/ci.md +137 -0
- package/docs/fr/cli/index.md +7 -1
- package/docs/fr/cli/list.md +39 -2
- package/docs/fr/cli/list_projects.md +131 -0
- package/docs/fr/intlayer_CMS.md +20 -0
- package/docs/fr/intlayer_with_next-i18next.md +0 -1
- package/docs/fr/intlayer_with_nextjs_14.md +28 -0
- package/docs/fr/intlayer_with_nextjs_15.md +28 -0
- package/docs/fr/intlayer_with_nextjs_16.md +28 -0
- package/docs/fr/intlayer_with_nextjs_no_locale_path.md +1174 -0
- package/docs/fr/plugins/sync-json.md +9 -5
- package/docs/hi/cli/ci.md +137 -0
- package/docs/hi/cli/index.md +7 -1
- package/docs/hi/cli/list.md +38 -1
- package/docs/hi/cli/list_projects.md +130 -0
- package/docs/hi/intlayer_CMS.md +20 -0
- package/docs/hi/intlayer_with_next-i18next.md +0 -1
- package/docs/hi/intlayer_with_nextjs_14.md +28 -0
- package/docs/hi/intlayer_with_nextjs_15.md +28 -0
- package/docs/hi/intlayer_with_nextjs_16.md +28 -0
- package/docs/hi/intlayer_with_nextjs_no_locale_path.md +1151 -0
- package/docs/hi/plugins/sync-json.md +6 -2
- package/docs/id/cli/ci.md +137 -0
- package/docs/id/cli/index.md +7 -1
- package/docs/id/cli/list.md +38 -1
- package/docs/id/cli/list_projects.md +128 -0
- package/docs/id/intlayer_CMS.md +20 -0
- package/docs/id/intlayer_with_next-i18next.md +0 -1
- package/docs/id/intlayer_with_nextjs_14.md +28 -0
- package/docs/id/intlayer_with_nextjs_15.md +28 -0
- package/docs/id/intlayer_with_nextjs_16.md +28 -0
- package/docs/id/intlayer_with_nextjs_no_locale_path.md +1154 -0
- package/docs/id/plugins/sync-json.md +6 -2
- package/docs/it/cli/ci.md +137 -0
- package/docs/it/cli/index.md +7 -1
- package/docs/it/cli/list.md +39 -2
- package/docs/it/cli/list_projects.md +130 -0
- package/docs/it/intlayer_CMS.md +20 -0
- package/docs/it/intlayer_with_next-i18next.md +0 -1
- package/docs/it/intlayer_with_nextjs_14.md +28 -0
- package/docs/it/intlayer_with_nextjs_15.md +28 -0
- package/docs/it/intlayer_with_nextjs_16.md +28 -0
- package/docs/it/intlayer_with_nextjs_no_locale_path.md +1148 -0
- package/docs/it/plugins/sync-json.md +6 -2
- package/docs/ja/cli/ci.md +137 -0
- package/docs/ja/cli/index.md +7 -1
- package/docs/ja/cli/list.md +38 -1
- package/docs/ja/cli/list_projects.md +136 -0
- package/docs/ja/intlayer_CMS.md +20 -0
- package/docs/ja/intlayer_with_next-i18next.md +0 -1
- package/docs/ja/intlayer_with_nextjs_14.md +28 -0
- package/docs/ja/intlayer_with_nextjs_15.md +28 -0
- package/docs/ja/intlayer_with_nextjs_16.md +28 -0
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +1222 -0
- package/docs/ja/plugins/sync-json.md +6 -2
- package/docs/ko/cli/ci.md +137 -0
- package/docs/ko/cli/index.md +7 -1
- package/docs/ko/cli/list.md +38 -1
- package/docs/ko/cli/list_projects.md +128 -0
- package/docs/ko/intlayer_CMS.md +20 -0
- package/docs/ko/intlayer_with_next-i18next.md +0 -1
- package/docs/ko/intlayer_with_nextjs_14.md +28 -0
- package/docs/ko/intlayer_with_nextjs_15.md +28 -0
- package/docs/ko/intlayer_with_nextjs_16.md +28 -0
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +1205 -0
- package/docs/ko/plugins/sync-json.md +6 -2
- package/docs/pl/cli/ci.md +137 -0
- package/docs/pl/cli/index.md +7 -1
- package/docs/pl/cli/list.md +39 -2
- package/docs/pl/cli/list_projects.md +130 -0
- package/docs/pl/intlayer_CMS.md +20 -0
- package/docs/pl/intlayer_with_next-i18next.md +0 -1
- package/docs/pl/intlayer_with_nextjs_14.md +28 -0
- package/docs/pl/intlayer_with_nextjs_15.md +28 -0
- package/docs/pl/intlayer_with_nextjs_16.md +28 -0
- package/docs/pl/intlayer_with_nextjs_no_locale_path.md +1149 -0
- package/docs/pl/plugins/sync-json.md +6 -2
- package/docs/pt/cli/ci.md +137 -0
- package/docs/pt/cli/index.md +7 -1
- package/docs/pt/cli/list.md +39 -2
- package/docs/pt/cli/list_projects.md +134 -0
- package/docs/pt/intlayer_CMS.md +20 -0
- package/docs/pt/intlayer_with_next-i18next.md +0 -1
- package/docs/pt/intlayer_with_nextjs_14.md +28 -0
- package/docs/pt/intlayer_with_nextjs_15.md +28 -0
- package/docs/pt/intlayer_with_nextjs_16.md +28 -0
- package/docs/pt/intlayer_with_nextjs_no_locale_path.md +1152 -0
- package/docs/pt/plugins/sync-json.md +6 -2
- package/docs/ru/cli/ci.md +137 -0
- package/docs/ru/cli/index.md +7 -1
- package/docs/ru/cli/list.md +39 -2
- package/docs/ru/cli/list_projects.md +130 -0
- package/docs/ru/intlayer_CMS.md +20 -0
- package/docs/ru/intlayer_with_next-i18next.md +0 -1
- package/docs/ru/intlayer_with_nextjs_14.md +28 -0
- package/docs/ru/intlayer_with_nextjs_15.md +28 -0
- package/docs/ru/intlayer_with_nextjs_16.md +28 -0
- package/docs/ru/intlayer_with_nextjs_no_locale_path.md +1204 -0
- package/docs/ru/plugins/sync-json.md +6 -2
- package/docs/tr/cli/ci.md +137 -0
- package/docs/tr/cli/index.md +7 -1
- package/docs/tr/cli/list.md +39 -2
- package/docs/tr/cli/list_projects.md +134 -0
- package/docs/tr/intlayer_CMS.md +20 -0
- package/docs/tr/intlayer_with_next-i18next.md +0 -1
- package/docs/tr/intlayer_with_nextjs_14.md +28 -0
- package/docs/tr/intlayer_with_nextjs_15.md +28 -0
- package/docs/tr/intlayer_with_nextjs_16.md +28 -0
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +1159 -0
- package/docs/tr/plugins/sync-json.md +6 -2
- package/docs/uk/compiler.md +133 -0
- package/docs/uk/component_i18n.md +194 -0
- package/docs/uk/intlayer_with_nextjs_14.md +1646 -0
- package/docs/uk/intlayer_with_nextjs_15.md +1910 -0
- package/docs/uk/intlayer_with_nextjs_16.md +1763 -0
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +1159 -0
- package/docs/uk/intlayer_with_react_native+expo.md +715 -0
- package/docs/uk/packages/intlayer/getConfiguration.md +145 -0
- package/docs/uk/vs_code_extension.md +133 -0
- package/docs/vi/cli/ci.md +137 -0
- package/docs/vi/cli/index.md +7 -1
- package/docs/vi/cli/list.md +38 -1
- package/docs/vi/cli/list_projects.md +130 -0
- package/docs/vi/intlayer_CMS.md +20 -0
- package/docs/vi/intlayer_with_next-i18next.md +0 -1
- package/docs/vi/intlayer_with_nextjs_14.md +28 -0
- package/docs/vi/intlayer_with_nextjs_15.md +28 -0
- package/docs/vi/intlayer_with_nextjs_16.md +28 -0
- package/docs/vi/intlayer_with_nextjs_no_locale_path.md +1151 -0
- package/docs/vi/plugins/sync-json.md +6 -2
- package/docs/zh/cli/ci.md +137 -0
- package/docs/zh/cli/index.md +7 -1
- package/docs/zh/cli/list.md +38 -1
- package/docs/zh/cli/list_projects.md +130 -0
- package/docs/zh/intlayer_CMS.md +20 -0
- package/docs/zh/intlayer_with_next-i18next.md +0 -1
- package/docs/zh/intlayer_with_nextjs_14.md +28 -0
- package/docs/zh/intlayer_with_nextjs_15.md +28 -0
- package/docs/zh/intlayer_with_nextjs_16.md +28 -0
- package/docs/zh/intlayer_with_nextjs_no_locale_path.md +1206 -0
- package/docs/zh/plugins/sync-json.md +9 -5
- package/frequent_questions/ar/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/de/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/en/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/en-GB/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/es/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/fr/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/hi/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/id/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/it/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/ja/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/ko/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/pl/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/pt/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/ru/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/tr/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/vi/SSR_Next_no_[locale].md +1 -1
- package/frequent_questions/zh/SSR_Next_no_[locale].md +1 -1
- package/package.json +6 -6
- package/src/generated/blog.entry.ts +29 -0
- package/src/generated/docs.entry.ts +157 -0
- package/src/generated/frequentQuestions.entry.ts +15 -0
- package/src/generated/legal.entry.ts +2 -0
|
@@ -108,18 +108,22 @@ syncJSON({
|
|
|
108
108
|
source: ({ key, locale }) => string, // erforderlich
|
|
109
109
|
location?: string, // optionales Label, Standard: "plugin"
|
|
110
110
|
priority?: number, // optionale Priorität zur Konfliktlösung, Standard: 0
|
|
111
|
-
format?: 'intlayer' | 'icu' | 'i18next', // optionaler Formatierer,
|
|
111
|
+
format?: 'intlayer' | 'icu' | 'i18next', // optionaler Formatierer, verwendet für Intlayer-Runtime-Kompatibilität
|
|
112
112
|
});
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
#### `format` ('intlayer' | 'icu' | 'i18next')
|
|
116
116
|
|
|
117
|
-
Gibt den Formatierer an, der für den Wörterbuchinhalt bei der Synchronisierung von JSON-Dateien verwendet werden soll. Dies ermöglicht die Verwendung verschiedener Nachrichtenformatierungssyntaxen, die mit
|
|
117
|
+
Gibt den Formatierer an, der für den Wörterbuchinhalt bei der Synchronisierung von JSON-Dateien verwendet werden soll. Dies ermöglicht die Verwendung verschiedener Nachrichtenformatierungssyntaxen, die mit der Intlayer-Runtime kompatibel sind.
|
|
118
118
|
|
|
119
|
+
- `undefined`: Es wird kein Formatierer verwendet, der JSON-Inhalt wird unverändert verwendet.
|
|
119
120
|
- `'intlayer'`: Der Standard-Intlayer-Formatierer (Standard).
|
|
120
121
|
- `'icu'`: Verwendet ICU-Nachrichtenformatierung (kompatibel mit Bibliotheken wie react-intl, vue-i18n).
|
|
121
122
|
- `'i18next'`: Verwendet i18next-Nachrichtenformatierung (kompatibel mit i18next, next-i18next, Solid-i18next).
|
|
122
123
|
|
|
124
|
+
> Beachten Sie, dass die Verwendung eines Formatierers Ihren JSON-Inhalt bei Ein- und Ausgabe transformiert. Bei komplexen JSON-Regeln wie ICU-Pluralen kann das Parsing keine 1-zu-1-Zuordnung zwischen Ein- und Ausgabe garantieren.
|
|
125
|
+
> Wenn Sie die Intlayer-Runtime nicht verwenden, sollten Sie möglicherweise keinen Formatierer festlegen.
|
|
126
|
+
|
|
123
127
|
**Beispiel:**
|
|
124
128
|
|
|
125
129
|
```ts
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-01-06
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
|
+
title: CI Command
|
|
5
|
+
description: Learn how to use the Intlayer CI command to run Intlayer commands with auto-injected credentials in CI/CD pipelines and monorepos.
|
|
6
|
+
keywords:
|
|
7
|
+
- CI
|
|
8
|
+
- CI/CD
|
|
9
|
+
- Automation
|
|
10
|
+
- Monorepo
|
|
11
|
+
- Credentials
|
|
12
|
+
- CLI
|
|
13
|
+
- Intlayer
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- concept
|
|
17
|
+
- cli
|
|
18
|
+
- ci
|
|
19
|
+
history:
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Add CI command
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# CI Command
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx intlayer ci <command...>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The CI command is designed for automation and CI/CD pipelines. It automatically injects credentials from the `INTLAYER_PROJECT_CREDENTIALS` environment variable and can run Intlayer commands across multiple projects in a monorepo.
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
The CI command operates in two modes:
|
|
36
|
+
|
|
37
|
+
1. **Single Project Mode**: If the current working directory matches one of the project paths in `INTLAYER_PROJECT_CREDENTIALS`, it runs the command for that specific project only.
|
|
38
|
+
|
|
39
|
+
2. **Iteration Mode**: If no specific project context is detected, it iterates over all configured projects and runs the command for each one.
|
|
40
|
+
|
|
41
|
+
## Environment Variable
|
|
42
|
+
|
|
43
|
+
The command requires the `INTLAYER_PROJECT_CREDENTIALS` environment variable to be set. This variable should contain a JSON object mapping project paths to their credentials:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"packages/app": {
|
|
48
|
+
"clientId": "your-client-id-1",
|
|
49
|
+
"clientSecret": "your-client-secret-1"
|
|
50
|
+
},
|
|
51
|
+
"packages/admin": {
|
|
52
|
+
"clientId": "your-client-id-2",
|
|
53
|
+
"clientSecret": "your-client-secret-2"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Package Manager Detection
|
|
59
|
+
|
|
60
|
+
The CI command automatically detects which package manager is being used (npm, yarn, pnpm, or bun) based on the `npm_config_user_agent` environment variable and uses the appropriate command to execute Intlayer.
|
|
61
|
+
|
|
62
|
+
## Arguments
|
|
63
|
+
|
|
64
|
+
- **`<command...>`**: The Intlayer command to execute (e.g., `fill`, `push`, `build`). You can pass any Intlayer command and its arguments.
|
|
65
|
+
|
|
66
|
+
> Example: `npx intlayer ci fill --verbose`
|
|
67
|
+
>
|
|
68
|
+
> Example: `npx intlayer ci push`
|
|
69
|
+
>
|
|
70
|
+
> Example: `npx intlayer ci build`
|
|
71
|
+
|
|
72
|
+
## Examples
|
|
73
|
+
|
|
74
|
+
### Run a command in single project mode
|
|
75
|
+
|
|
76
|
+
If you're in a project directory that matches one of the paths in `INTLAYER_PROJECT_CREDENTIALS`:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cd packages/app
|
|
80
|
+
npx intlayer ci fill
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This will run the `fill` command with credentials automatically injected for the `packages/app` project.
|
|
84
|
+
|
|
85
|
+
### Run a command across all projects
|
|
86
|
+
|
|
87
|
+
If you're in a directory that doesn't match any project path, the command will iterate over all configured projects:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cd /path/to/monorepo
|
|
91
|
+
npx intlayer ci push
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This will run the `push` command for each project configured in `INTLAYER_PROJECT_CREDENTIALS`.
|
|
95
|
+
|
|
96
|
+
### Pass additional flags
|
|
97
|
+
|
|
98
|
+
You can pass any flags to the underlying Intlayer command:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx intlayer ci fill --verbose --mode complete
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Use in CI/CD pipelines
|
|
105
|
+
|
|
106
|
+
In your CI/CD configuration (e.g., GitHub Actions, GitLab CI), set the `INTLAYER_PROJECT_CREDENTIALS` as a secret:
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
# GitHub Actions example
|
|
110
|
+
env:
|
|
111
|
+
INTLAYER_PROJECT_CREDENTIALS: ${{ secrets.INTLAYER_PROJECT_CREDENTIALS }}
|
|
112
|
+
|
|
113
|
+
steps:
|
|
114
|
+
- name: Fill dictionaries
|
|
115
|
+
run: npx intlayer ci fill
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Error Handling
|
|
119
|
+
|
|
120
|
+
- If `INTLAYER_PROJECT_CREDENTIALS` is not set, the command will exit with an error.
|
|
121
|
+
- If `INTLAYER_PROJECT_CREDENTIALS` is not valid JSON, the command will exit with an error.
|
|
122
|
+
- If a project path doesn't exist, it will be skipped with a warning.
|
|
123
|
+
- If any project fails, the command will exit with a non-zero status code.
|
|
124
|
+
|
|
125
|
+
## Use Cases
|
|
126
|
+
|
|
127
|
+
- **Monorepo automation**: Run Intlayer commands across multiple projects in a monorepo
|
|
128
|
+
- **CI/CD pipelines**: Automate dictionary management in continuous integration workflows
|
|
129
|
+
- **Bulk operations**: Perform the same operation on multiple Intlayer projects at once
|
|
130
|
+
- **Secret management**: Securely manage credentials for multiple projects using environment variables
|
|
131
|
+
|
|
132
|
+
## Security Best Practices
|
|
133
|
+
|
|
134
|
+
- Store `INTLAYER_PROJECT_CREDENTIALS` as encrypted secrets in your CI/CD platform
|
|
135
|
+
- Never commit credentials to version control
|
|
136
|
+
- Use environment-specific credentials for different deployment environments
|
|
137
|
+
- Rotate credentials regularly
|
package/docs/en/cli/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
4
|
title: CLI - All Intlayer CLI commands for your multilingual website
|
|
5
5
|
description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in a few minutes.
|
|
6
6
|
keywords:
|
|
@@ -17,6 +17,12 @@ slugs:
|
|
|
17
17
|
- concept
|
|
18
18
|
- cli
|
|
19
19
|
history:
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Add CI command
|
|
23
|
+
- version: 7.5.11
|
|
24
|
+
date: 2026-01-06
|
|
25
|
+
changes: Add projects list command
|
|
20
26
|
- version: 7.5.9
|
|
21
27
|
date: 2025-12-30
|
|
22
28
|
changes: Add init command
|
|
@@ -119,6 +125,7 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
119
125
|
- **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/build.md)** - Build your dictionaries from content declaration files
|
|
120
126
|
- **[Watch Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/watch.md)** - Watch for changes and automatically build dictionaries
|
|
121
127
|
- **[Check CLI Version](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/version.md)** - Check the installed Intlayer CLI version
|
|
128
|
+
- **[List Projects](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/list_projects.md)** - List all Intlayer projects in a directory or git repository
|
|
122
129
|
|
|
123
130
|
### Dictionary Management
|
|
124
131
|
|
|
@@ -147,6 +154,10 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
147
154
|
- **[Editor Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/editor.md)** - Use the Intlayer editor commands
|
|
148
155
|
- **[Live Sync Commands](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/live.md)** - Use Live Sync to reflect CMS content changes at runtime
|
|
149
156
|
|
|
157
|
+
### CI/CD & Automation
|
|
158
|
+
|
|
159
|
+
- **[CI Command](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/ci.md)** - Run Intlayer commands with auto-injected credentials for CI/CD pipelines
|
|
160
|
+
|
|
150
161
|
### Development Tools
|
|
151
162
|
|
|
152
163
|
- **[CLI SDK](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/sdk.md)** - Use the Intlayer CLI SDK in your own code
|
|
@@ -166,6 +177,7 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
166
177
|
"intlayer:list": "npx intlayer content list",
|
|
167
178
|
"intlayer:test": "npx intlayer content test",
|
|
168
179
|
"intlayer:transform": "npx intlayer transform",
|
|
180
|
+
"intlayer:projects": "npx intlayer projects list",
|
|
169
181
|
"intlayer:doc:translate": "npx intlayer doc translate",
|
|
170
182
|
"intlayer:doc:review": "npx intlayer doc review"
|
|
171
183
|
}
|
|
@@ -175,3 +187,4 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
175
187
|
>
|
|
176
188
|
> - `npx intlayer list` instead of `npx intlayer content list`
|
|
177
189
|
> - `npx intlayer test` instead of `npx intlayer content test`
|
|
190
|
+
> - `npx intlayer projects-list` or `npx intlayer pl` instead of `npx intlayer projects list`
|
package/docs/en/cli/list.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
4
|
title: List Content Declaration Files
|
|
5
5
|
description: Learn how to list all content declaration files in your project.
|
|
6
6
|
keywords:
|
|
@@ -13,6 +13,13 @@ slugs:
|
|
|
13
13
|
- concept
|
|
14
14
|
- cli
|
|
15
15
|
- list
|
|
16
|
+
history:
|
|
17
|
+
- version: 7.5.12
|
|
18
|
+
date: 2026-01-06
|
|
19
|
+
changes: Add absolute output option to list command
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Add JSON output option to list command
|
|
16
23
|
---
|
|
17
24
|
|
|
18
25
|
# List content declaration files
|
|
@@ -27,14 +34,36 @@ npx intlayer content list
|
|
|
27
34
|
|
|
28
35
|
This command displays all content declaration files in your project, showing their dictionary keys and file paths. It's useful for getting an overview of all your content files and verifying that they are properly discovered by Intlayer.
|
|
29
36
|
|
|
30
|
-
##
|
|
37
|
+
## Arguments:
|
|
38
|
+
|
|
39
|
+
- **`--json`**: Output the results as JSON instead of formatted text. Useful for scripting and programmatic access.
|
|
40
|
+
|
|
41
|
+
> Example: `npx intlayer content list --json`
|
|
42
|
+
|
|
43
|
+
## Examples:
|
|
44
|
+
|
|
45
|
+
### List content declaration files:
|
|
31
46
|
|
|
32
47
|
```bash
|
|
33
48
|
npx intlayer content list
|
|
34
49
|
```
|
|
35
50
|
|
|
51
|
+
### Output as JSON:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx intlayer content list --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Output as absolute paths:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx intlayer content list --absolute
|
|
61
|
+
```
|
|
62
|
+
|
|
36
63
|
## Example output:
|
|
37
64
|
|
|
65
|
+
### Formatted output:
|
|
66
|
+
|
|
38
67
|
```bash
|
|
39
68
|
npx intlayer content list
|
|
40
69
|
Content declaration files:
|
|
@@ -45,6 +74,14 @@ Content declaration files:
|
|
|
45
74
|
Total content declaration files: 3
|
|
46
75
|
```
|
|
47
76
|
|
|
77
|
+
### JSON output:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
$ npx intlayer content list --json
|
|
81
|
+
|
|
82
|
+
[{"key":"home-page","path":"src/components/HomePage/homePage.content.ts"},{"key":"server-component","path":"src/components/ServerComponent/serverComponent.content.ts"},{"key":"client-component","path":"src/components/ClientComponent/clientComponent.content.ts"}]
|
|
83
|
+
```
|
|
84
|
+
|
|
48
85
|
This command will output:
|
|
49
86
|
|
|
50
87
|
- A formatted list of all content declaration files with their keys and relative file paths
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-12-30
|
|
3
|
+
updatedAt: 2025-12-30
|
|
4
|
+
title: List Intlayer Projects
|
|
5
|
+
description: Learn how to list all Intlayer projects in a directory or git repository.
|
|
6
|
+
keywords:
|
|
7
|
+
- List
|
|
8
|
+
- Projects
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Git
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- concept
|
|
15
|
+
- cli
|
|
16
|
+
- list-projects
|
|
17
|
+
history:
|
|
18
|
+
- version: 7.5.12
|
|
19
|
+
date: 2026-01-06
|
|
20
|
+
changes: Add absolute output option to list projects command
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# List Intlayer Projects
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx intlayer projects list
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This command searches for and lists all Intlayer projects by finding directories that contain Intlayer configuration files. It's useful for discovering all Intlayer projects in a monorepo, workspace, or git repository.
|
|
30
|
+
|
|
31
|
+
## Aliases:
|
|
32
|
+
|
|
33
|
+
- `npx intlayer projects-list`
|
|
34
|
+
- `npx intlayer pl`
|
|
35
|
+
|
|
36
|
+
## Arguments:
|
|
37
|
+
|
|
38
|
+
- **`--base-dir [path]`**: Specify the base directory to search from. Defaults to the current working directory.
|
|
39
|
+
|
|
40
|
+
> Example: `npx intlayer projects list --base-dir /path/to/workspace`
|
|
41
|
+
|
|
42
|
+
- **`--git-root`**: Search from the git root directory instead of the base directory. This is useful for finding all Intlayer projects in a monorepo or git repository.
|
|
43
|
+
|
|
44
|
+
> Example: `npx intlayer projects list --git-root`
|
|
45
|
+
|
|
46
|
+
- **`--json`**: Output the results as JSON instead of formatted text. Useful for scripting and programmatic access.
|
|
47
|
+
|
|
48
|
+
> Example: `npx intlayer projects list --json`
|
|
49
|
+
|
|
50
|
+
- **`--absolute`**: Output the results as absolute paths instead of relative paths.
|
|
51
|
+
|
|
52
|
+
> Example: `npx intlayer projects list --absolute`
|
|
53
|
+
|
|
54
|
+
## How it works:
|
|
55
|
+
|
|
56
|
+
The command searches for Intlayer configuration files in the specified directory (or git root if `--git-root` is used). It looks for the following configuration file patterns:
|
|
57
|
+
|
|
58
|
+
- `intlayer.config.ts`
|
|
59
|
+
- `intlayer.config.js`
|
|
60
|
+
- `intlayer.config.json`
|
|
61
|
+
- `intlayer.config.cjs`
|
|
62
|
+
- `intlayer.config.mjs`
|
|
63
|
+
- `.intlayerrc`
|
|
64
|
+
|
|
65
|
+
Each directory containing one of these files is considered an Intlayer project and will be listed in the output.
|
|
66
|
+
|
|
67
|
+
## Examples:
|
|
68
|
+
|
|
69
|
+
### List projects in current directory:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx intlayer projects list
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### List projects in a specific directory:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npx intlayer projects list --base-dir ./packages
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### List all projects in the git repository:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx intlayer projects list --git-root
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Using the shortcut alias:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx intlayer pl --git-root
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Output as JSON:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx intlayer projects list --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Example output:
|
|
100
|
+
|
|
101
|
+
### Formatted output:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
$ npx intlayer projects list --git-root
|
|
105
|
+
|
|
106
|
+
Found 3 Intlayer project(s):
|
|
107
|
+
|
|
108
|
+
- /Users/user/workspace/packages/app
|
|
109
|
+
- /Users/user/workspace/packages/admin
|
|
110
|
+
- /Users/user/workspace/packages/shared
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### JSON output:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
$ npx intlayer projects list --json
|
|
117
|
+
|
|
118
|
+
["/Users/user/workspace/packages/app","/Users/user/workspace/packages/admin","/Users/user/workspace/packages/shared"]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Use cases:
|
|
122
|
+
|
|
123
|
+
- **Monorepo management**: Discover all Intlayer projects in a monorepo structure
|
|
124
|
+
- **Project discovery**: Find all Intlayer-enabled projects in a workspace
|
|
125
|
+
- **CI/CD**: Verify Intlayer projects in automated workflows
|
|
126
|
+
- **Documentation**: Generate documentation listing all projects using Intlayer
|
|
127
|
+
|
|
128
|
+
The output provides absolute paths to each project directory, making it easy to navigate to or script operations on multiple Intlayer projects.
|
|
@@ -280,7 +280,7 @@ This approach allows you to:
|
|
|
280
280
|
|
|
281
281
|
GitHub stars are a strong indicator of a project's popularity, community trust, and long-term relevance. While not a direct measure of technical quality, they reflect how many developers find the project useful, follow its progress, and are likely to adopt it. For estimating the value of a project, stars help compare traction across alternatives and provide insights into ecosystem growth.
|
|
282
282
|
|
|
283
|
-
[](https://www.star-history.com/#formatjs/formatjs&i18next/react-i18next&i18next/i18next&i18next/next-i18next&lingui/js-lingui&amannn/next-intl&intlify/vue-i18n&opral/
|
|
283
|
+
[](https://www.star-history.com/#formatjs/formatjs&i18next/react-i18next&i18next/i18next&i18next/next-i18next&lingui/js-lingui&amannn/next-intl&intlify/vue-i18n&aymericzip/intlayer&opral/inlang&type=date&legend=top-left)
|
|
284
284
|
|
|
285
285
|
---
|
|
286
286
|
|
package/docs/en/intlayer_CMS.md
CHANGED
|
@@ -77,6 +77,26 @@ For integration with Vite + React, refer to the [setup guide](https://github.com
|
|
|
77
77
|
|
|
78
78
|
## Configuration
|
|
79
79
|
|
|
80
|
+
Run the following command to login to the Intlayer CMS:
|
|
81
|
+
|
|
82
|
+
```bash packageManager="npm"
|
|
83
|
+
npx intlayer login
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```bash packageManager="yarn"
|
|
87
|
+
yarn intlayer login
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```bash packageManager="pnpm"
|
|
91
|
+
pnpm intlayer login
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```bash packageManager="bun"
|
|
95
|
+
bunx intlayer login
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This will open your default browser to complete the authentication process and receive the necessary credentials (Client ID and Client Secret) to use Intlayer services.
|
|
99
|
+
|
|
80
100
|
In your Intlayer configuration file, you can customize the CMS settings:
|
|
81
101
|
|
|
82
102
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
@@ -105,6 +105,34 @@ bunx intlayer init
|
|
|
105
105
|
|
|
106
106
|
### Step 2: Configure Your Project
|
|
107
107
|
|
|
108
|
+
Here is the final structure that we will make:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
.
|
|
112
|
+
├── src
|
|
113
|
+
│ ├── app
|
|
114
|
+
│ │ ├── [locale]
|
|
115
|
+
│ │ │ ├── layout.tsx # Locale layout for the Intlayer provider
|
|
116
|
+
│ │ │ ├── page.content.ts
|
|
117
|
+
│ │ │ └── page.tsx
|
|
118
|
+
│ │ └── layout.tsx # Root layout for style and global providers
|
|
119
|
+
│ ├── components
|
|
120
|
+
│ │ ├── client-component-example.content.ts
|
|
121
|
+
│ │ ├── ClientComponentExample.tsx
|
|
122
|
+
│ │ ├── LocaleSwitcher
|
|
123
|
+
│ │ │ ├── localeSwitcher.content.ts
|
|
124
|
+
│ │ │ └── LocaleSwitcher.tsx
|
|
125
|
+
│ │ ├── server-component-example.content.ts
|
|
126
|
+
│ │ └── ServerComponentExample.tsx
|
|
127
|
+
│ └── middleware.ts
|
|
128
|
+
├── intlayer.config.ts
|
|
129
|
+
├── next.config.ts
|
|
130
|
+
├── package.json
|
|
131
|
+
└── tsconfig.json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
> If you don't want locale routing, intlayer can be used as a simple provider / hook. See [this guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_no_locale_path.md) for more details.
|
|
135
|
+
|
|
108
136
|
Create a config file to configure the languages of your application:
|
|
109
137
|
|
|
110
138
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
@@ -126,6 +126,34 @@ bunx intlayer init
|
|
|
126
126
|
|
|
127
127
|
### Step 2: Configure Your Project
|
|
128
128
|
|
|
129
|
+
Here is the final structure that we will make:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
.
|
|
133
|
+
├── src
|
|
134
|
+
│ ├── app
|
|
135
|
+
│ │ ├── [locale]
|
|
136
|
+
│ │ │ ├── layout.tsx # Locale layout for the Intlayer provider
|
|
137
|
+
│ │ │ ├── page.content.ts
|
|
138
|
+
│ │ │ └── page.tsx
|
|
139
|
+
│ │ └── layout.tsx # Root layout for style and global providers
|
|
140
|
+
│ ├── components
|
|
141
|
+
│ │ ├── client-component-example.content.ts
|
|
142
|
+
│ │ ├── ClientComponentExample.tsx
|
|
143
|
+
│ │ ├── LocaleSwitcher
|
|
144
|
+
│ │ │ ├── localeSwitcher.content.ts
|
|
145
|
+
│ │ │ └── LocaleSwitcher.tsx
|
|
146
|
+
│ │ ├── server-component-example.content.ts
|
|
147
|
+
│ │ └── ServerComponentExample.tsx
|
|
148
|
+
│ └── middleware.ts
|
|
149
|
+
├── intlayer.config.ts
|
|
150
|
+
├── next.config.ts
|
|
151
|
+
├── package.json
|
|
152
|
+
└── tsconfig.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
> If you don't want locale routing, intlayer can be used as a simple provider / hook. See [this guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_no_locale_path.md) for more details.
|
|
156
|
+
|
|
129
157
|
Create a config file to configure the languages of your application:
|
|
130
158
|
|
|
131
159
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
@@ -67,7 +67,9 @@ With Intlayer, you can:
|
|
|
67
67
|
- **Ensure TypeScript support** with autogenerated types, improving autocompletion and error detection.
|
|
68
68
|
- **Benefit from advanced features**, like dynamic locale detection and switching.
|
|
69
69
|
|
|
70
|
-
> Intlayer is compatible with Next.js 12, 13, 14, and 16. If you are using Next.js Page Router, you can refer to this [guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_page_router.md).
|
|
70
|
+
> Intlayer is compatible with Next.js 12, 13, 14, and 16. If you are using Next.js Page Router, you can refer to this [guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_page_router.md).
|
|
71
|
+
> Locale routing is useful for SEO, bundle size, and performance. If you don't need it, you can refer to this [guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_no_locale_path.md).
|
|
72
|
+
> For Next.js 12, 13, 14 with App Router, refer to this [guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_14.md).
|
|
71
73
|
|
|
72
74
|
---
|
|
73
75
|
|
|
@@ -107,6 +109,34 @@ bunx intlayer init
|
|
|
107
109
|
|
|
108
110
|
### Step 2: Configure Your Project
|
|
109
111
|
|
|
112
|
+
Here is the final structure that we will make:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
.
|
|
116
|
+
├── src
|
|
117
|
+
│ ├── app
|
|
118
|
+
│ │ ├── [locale]
|
|
119
|
+
│ │ │ ├── layout.tsx # Locale layout for the Intlayer provider
|
|
120
|
+
│ │ │ ├── page.content.ts
|
|
121
|
+
│ │ │ └── page.tsx
|
|
122
|
+
│ │ └── layout.tsx # Root layout for style and global providers
|
|
123
|
+
│ ├── components
|
|
124
|
+
│ │ ├── client-component-example.content.ts
|
|
125
|
+
│ │ ├── ClientComponentExample.tsx
|
|
126
|
+
│ │ ├── LocaleSwitcher
|
|
127
|
+
│ │ │ ├── localeSwitcher.content.ts
|
|
128
|
+
│ │ │ └── LocaleSwitcher.tsx
|
|
129
|
+
│ │ ├── server-component-example.content.ts
|
|
130
|
+
│ │ └── ServerComponentExample.tsx
|
|
131
|
+
│ └── proxy.ts
|
|
132
|
+
├── intlayer.config.ts
|
|
133
|
+
├── next.config.ts
|
|
134
|
+
├── package.json
|
|
135
|
+
└── tsconfig.json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
> If you don't want locale routing, intlayer can be used as a simple provider / hook. See [this guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_no_locale_path.md) for more details.
|
|
139
|
+
|
|
110
140
|
Create a config file to configure the languages of your application:
|
|
111
141
|
|
|
112
142
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|