@intlayer/docs 5.8.0-canary.0 → 5.8.1-canary.0
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_next-i18next.md +2 -2
- package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +96 -219
- package/blog/ar/react-i18next_vs_react-intl_vs_intlayer.md +88 -129
- package/blog/ar/vue-i18n_vs_intlayer.md +268 -0
- package/blog/de/intlayer_with_next-i18next.md +2 -2
- package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/de/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/de/vue-i18n_vs_intlayer.md +268 -0
- package/blog/en/intlayer_with_next-i18next.md +2 -2
- package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/en/react-i18next_vs_react-intl_vs_intlayer.md +88 -120
- package/blog/en/vue-i18n_vs_intlayer.md +276 -0
- package/blog/en-GB/intlayer_with_next-i18next.md +2 -2
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +85 -218
- package/blog/en-GB/react-i18next_vs_react-intl_vs_intlayer.md +80 -130
- package/blog/en-GB/vue-i18n_vs_intlayer.md +258 -0
- package/blog/es/intlayer_with_next-i18next.md +2 -2
- package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/es/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/es/vue-i18n_vs_intlayer.md +268 -0
- package/blog/fr/intlayer_with_next-i18next.md +2 -2
- package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +91 -214
- package/blog/fr/react-i18next_vs_react-intl_vs_intlayer.md +86 -127
- package/blog/fr/vue-i18n_vs_intlayer.md +269 -0
- package/blog/hi/intlayer_with_next-i18next.md +2 -2
- package/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md +97 -220
- package/blog/hi/react-i18next_vs_react-intl_vs_intlayer.md +89 -130
- package/blog/hi/vue-i18n_vs_intlayer.md +268 -0
- package/blog/it/intlayer_with_next-i18next.md +2 -2
- package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +91 -214
- package/blog/it/react-i18next_vs_react-intl_vs_intlayer.md +86 -127
- package/blog/it/vue-i18n_vs_intlayer.md +268 -0
- package/blog/ja/intlayer_with_next-i18next.md +2 -2
- package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/ja/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/ja/vue-i18n_vs_intlayer.md +268 -0
- package/blog/ko/intlayer_with_next-i18next.md +2 -2
- package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +95 -217
- package/blog/ko/react-i18next_vs_react-intl_vs_intlayer.md +89 -130
- package/blog/ko/vue-i18n_vs_intlayer.md +268 -0
- package/blog/pt/intlayer_with_next-i18next.md +2 -2
- package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/pt/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/pt/vue-i18n_vs_intlayer.md +268 -0
- package/blog/ru/intlayer_with_next-i18next.md +2 -2
- package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +94 -217
- package/blog/ru/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/ru/vue-i18n_vs_intlayer.md +268 -0
- package/blog/zh/intlayer_with_next-i18next.md +2 -2
- package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/zh/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/zh/vue-i18n_vs_intlayer.md +269 -0
- package/dist/cjs/generated/blog.entry.cjs +41 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +41 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/docs/ar/formatters.md +417 -31
- package/docs/ar/how_works_intlayer.md +2 -4
- package/docs/ar/interest_of_intlayer.md +7 -10
- package/docs/ar/intlayer_CMS.md +2 -3
- package/docs/ar/intlayer_visual_editor.md +2 -3
- package/docs/ar/intlayer_with_tanstack.md +1 -1
- package/docs/ar/introduction.md +4 -4
- package/docs/de/formatters.md +444 -34
- package/docs/de/introduction.md +2 -2
- package/docs/en/dictionary/enumeration.md +2 -2
- package/docs/en/dictionary/function_fetching.md +2 -2
- package/docs/en/dictionary/get_started.md +2 -2
- package/docs/en/dictionary/translation.md +2 -2
- package/docs/en/formatters.md +383 -15
- package/docs/en/how_works_intlayer.md +2 -4
- package/docs/en/interest_of_intlayer.md +48 -29
- package/docs/en/intlayer_CMS.md +2 -3
- package/docs/en/intlayer_visual_editor.md +2 -3
- package/docs/en/intlayer_with_create_react_app.md +2 -2
- package/docs/en/intlayer_with_express.md +2 -2
- package/docs/en/intlayer_with_tanstack.md +1 -1
- package/docs/en/introduction.md +4 -4
- package/docs/en/packages/express-intlayer/index.md +2 -2
- package/docs/en/packages/intlayer/getConfiguration.md +2 -3
- package/docs/en/packages/intlayer/getEnumeration.md +2 -7
- package/docs/en/packages/intlayer/getHTMLTextDir.md +2 -4
- package/docs/en/packages/intlayer/getLocaleLang.md +2 -4
- package/docs/en/packages/intlayer/getLocaleName.md +2 -3
- package/docs/en/packages/intlayer/getLocalizedUrl.md +2 -8
- package/docs/en/packages/intlayer/getMultilingualUrls.md +2 -7
- package/docs/en/packages/intlayer/getPathWithoutLocale.md +2 -3
- package/docs/en/packages/intlayer/getTranslation.md +2 -4
- package/docs/en/packages/intlayer/index.md +2 -2
- package/docs/en/packages/next-intlayer/index.md +2 -2
- package/docs/en/packages/next-intlayer/t.md +2 -2
- package/docs/en/packages/next-intlayer/useDictionary.md +2 -2
- package/docs/en/packages/next-intlayer/useIntlayer.md +2 -2
- package/docs/en/packages/next-intlayer/useLocale.md +2 -2
- package/docs/en/packages/react-intlayer/index.md +2 -2
- package/docs/en/packages/react-intlayer/t.md +2 -2
- package/docs/en/packages/react-intlayer/useI18n.md +2 -2
- package/docs/en/packages/react-intlayer/useIntlayer.md +2 -2
- package/docs/en/packages/react-intlayer/useLocale.md +2 -2
- package/docs/en/packages/react-scripts-intlayer/index.md +2 -2
- package/docs/en/packages/solid-intlayer/index.md +2 -2
- package/docs/en/packages/vite-intlayer/index.md +2 -2
- package/docs/en-GB/formatters.md +402 -16
- package/docs/en-GB/how_works_intlayer.md +2 -4
- package/docs/en-GB/interest_of_intlayer.md +7 -10
- package/docs/en-GB/intlayer_with_tanstack.md +1 -1
- package/docs/en-GB/introduction.md +2 -2
- package/docs/es/formatters.md +438 -28
- package/docs/es/how_works_intlayer.md +2 -4
- package/docs/es/interest_of_intlayer.md +7 -10
- package/docs/es/intlayer_with_tanstack.md +1 -1
- package/docs/es/introduction.md +2 -2
- package/docs/fr/formatters.md +438 -28
- package/docs/fr/how_works_intlayer.md +2 -4
- package/docs/fr/interest_of_intlayer.md +7 -10
- package/docs/fr/intlayer_with_tanstack.md +1 -1
- package/docs/fr/introduction.md +2 -2
- package/docs/hi/formatters.md +430 -39
- package/docs/hi/how_works_intlayer.md +2 -4
- package/docs/hi/interest_of_intlayer.md +7 -10
- package/docs/hi/intlayer_with_tanstack.md +1 -1
- package/docs/hi/introduction.md +2 -2
- package/docs/it/formatters.md +438 -30
- package/docs/it/how_works_intlayer.md +2 -4
- package/docs/it/interest_of_intlayer.md +7 -10
- package/docs/it/intlayer_with_tanstack.md +1 -1
- package/docs/it/introduction.md +2 -2
- package/docs/ja/formatters.md +435 -47
- package/docs/ja/how_works_intlayer.md +2 -4
- package/docs/ja/interest_of_intlayer.md +7 -10
- package/docs/ja/intlayer_with_tanstack.md +1 -1
- package/docs/ja/introduction.md +2 -2
- package/docs/ko/formatters.md +432 -41
- package/docs/ko/how_works_intlayer.md +2 -4
- package/docs/ko/interest_of_intlayer.md +7 -10
- package/docs/ko/intlayer_with_tanstack.md +1 -1
- package/docs/ko/introduction.md +2 -2
- package/docs/pt/formatters.md +416 -30
- package/docs/pt/how_works_intlayer.md +2 -4
- package/docs/pt/intlayer_with_tanstack.md +1 -1
- package/docs/pt/introduction.md +2 -2
- package/docs/ru/autoFill.md +2 -2
- package/docs/ru/configuration.md +1 -40
- package/docs/ru/formatters.md +438 -28
- package/docs/ru/how_works_intlayer.md +5 -7
- package/docs/ru/index.md +1 -1
- package/docs/ru/interest_of_intlayer.md +8 -11
- package/docs/ru/intlayer_CMS.md +7 -8
- package/docs/ru/intlayer_cli.md +4 -7
- package/docs/ru/intlayer_visual_editor.md +5 -6
- package/docs/ru/intlayer_with_angular.md +1 -1
- package/docs/ru/intlayer_with_create_react_app.md +5 -5
- package/docs/ru/intlayer_with_lynx+react.md +1 -1
- package/docs/ru/intlayer_with_nextjs_15.md +3 -3
- package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ru/intlayer_with_nuxt.md +1 -1
- package/docs/ru/intlayer_with_react_native+expo.md +2 -2
- package/docs/ru/intlayer_with_tanstack.md +3 -3
- package/docs/ru/intlayer_with_vite+preact.md +3 -3
- package/docs/ru/intlayer_with_vite+react.md +3 -3
- package/docs/ru/intlayer_with_vite+solid.md +1 -1
- package/docs/ru/intlayer_with_vite+svelte.md +1 -1
- package/docs/ru/intlayer_with_vite+vue.md +2 -2
- package/docs/ru/introduction.md +5 -5
- package/docs/ru/locale_mapper.md +1 -1
- package/docs/ru/packages/@intlayer/api/index.md +2 -2
- package/docs/ru/packages/@intlayer/chokidar/index.md +1 -1
- package/docs/ru/packages/@intlayer/cli/index.md +2 -2
- package/docs/ru/packages/@intlayer/config/index.md +2 -2
- package/docs/ru/packages/@intlayer/core/index.md +2 -2
- package/docs/ru/packages/@intlayer/design-system/index.md +2 -2
- package/docs/ru/packages/@intlayer/dictionary-entry/index.md +2 -2
- package/docs/ru/packages/@intlayer/editor/index.md +1 -1
- package/docs/ru/packages/@intlayer/editor-react/index.md +1 -1
- package/docs/ru/packages/@intlayer/webpack/index.md +1 -1
- package/docs/ru/packages/angular-intlayer/index.md +1 -1
- package/docs/ru/packages/express-intlayer/index.md +3 -3
- package/docs/ru/packages/express-intlayer/t.md +1 -1
- package/docs/ru/packages/intlayer/getEnumeration.md +3 -8
- package/docs/ru/packages/intlayer/getTranslation.md +3 -5
- package/docs/ru/packages/intlayer/getTranslationContent.md +1 -3
- package/docs/ru/packages/intlayer/index.md +3 -3
- package/docs/ru/packages/intlayer-cli/index.md +1 -1
- package/docs/ru/packages/intlayer-editor/index.md +2 -2
- package/docs/ru/packages/lynx-intlayer/index.md +1 -1
- package/docs/ru/packages/next-intlayer/index.md +4 -4
- package/docs/ru/packages/next-intlayer/t.md +4 -4
- package/docs/ru/packages/next-intlayer/useLocale.md +3 -3
- package/docs/ru/packages/nuxt-intlayer/index.md +1 -1
- package/docs/ru/packages/preact-intlayer/index.md +1 -1
- package/docs/ru/packages/react-intlayer/index.md +4 -4
- package/docs/ru/packages/react-intlayer/t.md +4 -4
- package/docs/ru/packages/react-native-intlayer/index.md +1 -1
- package/docs/ru/packages/react-scripts-intlayer/index.md +3 -3
- package/docs/ru/packages/solid-intlayer/index.md +3 -3
- package/docs/ru/packages/svelte-intlayer/index.md +1 -1
- package/docs/ru/packages/vite-intlayer/index.md +3 -3
- package/docs/ru/packages/vue-intlayer/index.md +1 -1
- package/docs/ru/per_locale_file.md +1 -1
- package/docs/ru/roadmap.md +3 -5
- package/docs/ru/vs_code_extension.md +1 -1
- package/docs/zh/formatters.md +446 -38
- package/docs/zh/how_works_intlayer.md +2 -4
- package/docs/zh/interest_of_intlayer.md +7 -10
- package/docs/zh/intlayer_with_tanstack.md +1 -1
- package/docs/zh/introduction.md +2 -2
- package/frequent_questions/ar/domain_routing.md +1 -1
- package/frequent_questions/en/domain_routing.md +1 -1
- package/frequent_questions/en-GB/domain_routing.md +1 -1
- package/frequent_questions/es/domain_routing.md +1 -1
- package/frequent_questions/fr/domain_routing.md +1 -1
- package/frequent_questions/hi/domain_routing.md +1 -1
- package/frequent_questions/it/domain_routing.md +1 -1
- package/frequent_questions/ko/domain_routing.md +1 -1
- package/frequent_questions/pt/domain_routing.md +1 -1
- package/frequent_questions/ru/domain_routing.md +1 -1
- package/frequent_questions/ru/get_locale_cookie.md +4 -4
- package/frequent_questions/ru/static_rendering.md +1 -2
- package/frequent_questions/zh/domain_routing.md +1 -1
- package/package.json +9 -11
- package/src/generated/blog.entry.ts +42 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: next-i18next vs next-intl vs Intlayer
|
|
5
5
|
description: Compare next-i18next with next-intl and Intlayer for the internationalization (i18n) of a Next.js app
|
|
6
6
|
keywords:
|
|
@@ -17,277 +17,154 @@ slugs:
|
|
|
17
17
|
- next-i18next-vs-next-intl-vs-intlayer
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
# next-i18next VS next-intl VS
|
|
20
|
+
# next-i18next VS next-intl VS intlayer | Next.js Internationalization (i18n)
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
This guide compares three widely used i18n options for **Next.js**: **next-intl**, **next-i18next**, and **Intlayer**.
|
|
23
|
+
We focus on **Next.js 13+ App Router** (with **React Server Components**) and evaluate:
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
1. **Architecture & content organization**
|
|
26
|
+
2. **TypeScript & safety**
|
|
27
|
+
3. **Missing translation handling**
|
|
28
|
+
4. **Routing & middleware**
|
|
29
|
+
5. **Performance & loading behavior**
|
|
30
|
+
6. **Developer experience (DX), tooling & maintenance**
|
|
31
|
+
7. **SEO & large-project scalability**
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
2. **TypeScript support**
|
|
28
|
-
3. **Management of missing translations**
|
|
29
|
-
4. **Server Components support**
|
|
30
|
-
5. **Enhanced routing & middleware** for Next.js
|
|
31
|
-
6. **Simplicity of setup**
|
|
32
|
-
|
|
33
|
-
The guide also provides an **in-depth look at Intlayer**, showing why it can be a strong choice especially for Next.js 13+, including **App Router** and **Server Components**.
|
|
33
|
+
> **tl;dr**: All three can localize a Next.js app. If you want **component-scoped content**, **strict TypeScript types**, **build-time missing-key checks**, **tree-shaken dictionaries**, and **first-class App Router + SEO helpers**, **Intlayer** is the most complete, modern choice.
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
### 1. next-intl
|
|
37
|
+
## High-level positioning
|
|
40
38
|
|
|
41
|
-
**
|
|
39
|
+
- **next-intl** - Lightweight, straightforward message formatting with solid Next.js support. Centralized catalogs are common; DX is simple, but safety and large-scale maintenance remain mostly your responsibility.
|
|
40
|
+
- **next-i18next** - i18next in Next.js clothing. Mature ecosystem and features via plugins (e.g., ICU), but configuration can be verbose and catalogs tend to centralize as projects grow.
|
|
41
|
+
- **Intlayer** - Component-centric content model for Next.js, **strict TS typing**, **build-time checks**, **tree-shaking**, **built-in middleware & SEO helpers**, optional **Visual Editor/CMS**, and **AI-assisted translations**.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
- **TypeScript Support**: Basic TypeScript integration. Some type definitions exist, but they are not heavily centered on auto-generating TypeScript definitions from your translation files.
|
|
45
|
-
- **Missing Translations**: Basic fallback mechanism. By default, falls back to a key or a default locale string. No robust out-of-the-box tooling for advanced missing translations checks.
|
|
46
|
-
- **Server Components Support**: Works with Next.js 13+ in general, but the pattern is less specialized for deep server-side usage (e.g., server components with complex dynamic routing).
|
|
47
|
-
- **Routing & Middleware**: Middleware support is possible but limited. Typically relies on Next.js `Middleware` for locale detection, or manual configuration for rewriting locale paths.
|
|
48
|
-
- **Setup Simplicity**: Very straightforward. Minimal boilerplate is needed.
|
|
43
|
+
---
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
## Side-by-Side Feature Comparison (Next.js focused)
|
|
46
|
+
|
|
47
|
+
| Feature | `next-intlayer` (Intlayer) | `next-intl` | `next-i18next` |
|
|
48
|
+
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
49
|
+
| **Translations Near Components** | ✅ Yes, content collocated with each component | ❌ No | ❌ No |
|
|
50
|
+
| **TypeScript Integration** | ✅ Advanced, auto-generated strict types | ✅ Good | ⚠️ Basic |
|
|
51
|
+
| **Missing Translation Detection** | ✅ TypeScript error hightlight and build-time error/warning | ⚠️ Runtime fallback | ⚠️ Runtime fallback |
|
|
52
|
+
| **Rich Content (JSX/Markdown/components)** | ✅ Direct support | ❌ Not designed for rich nodes | ⚠️ Limited |
|
|
53
|
+
| **AI-powered Translation** | ✅ Yes, supports multiple AI providers. Usable using your own API keys. Considers the context of your application and content scope | ❌ No | ❌ No |
|
|
54
|
+
| **Visual Editor** | ✅ Yes, local Visual Editor + optional CMS; can externalize codebase content; embeddable | ❌ No / available via external localization platforms | ❌ No / available via external localization platforms |
|
|
55
|
+
| **Localized Routing** | ✅ Yes, supports localized paths out of the box (works with Next.js & Vite) | ✅ Built-in, App Router supports `[locale]` segment | ✅ Built-in |
|
|
56
|
+
| **Dynamic Route Generation** | ✅ Yes | ✅ Yes | ✅ Yes |
|
|
57
|
+
| **Pluralization** | ✅ Enumeration-based patterns | ✅ Good | ✅ Good |
|
|
58
|
+
| **Formatting (dates, numbers, currencies)** | ✅ Optimized formatters (Intl under the hood) | ✅ Good (Intl helpers) | ✅ Good (Intl helpers) |
|
|
59
|
+
| **Content Format** | ✅ .tsx, .ts, .js, .json, .md, .txt, (.yaml WIP) | ✅ .json, .js, .ts | ⚠️ .json |
|
|
60
|
+
| **ICU support** | ⚠️ WIP | ✅ Yes | ⚠️ Via plugin (`i18next-icu`) |
|
|
61
|
+
| **SEO Helpers (hreflang, sitemap)** | ✅ Built-in tools: helpers for sitemap, robots.txt, metadata | ✅ Good | ✅ Good |
|
|
62
|
+
| **Ecosystem / Community** | ⚠️ Smaller but growing fast and reactive | ✅ Good | ✅ Good |
|
|
63
|
+
| **Server-side Rendering & Server Components** | ✅ Yes, streamlined for SSR / React Server Components | ⚠️ Supported at page level but need to pass t-functions on component tree for children server components | ⚠️ Supported at page level but need to pass t-functions on component tree for children server components |
|
|
64
|
+
| **Tree-shaking (load only used content)** | ✅ Yes, per-component at build time via Babel/SWC plugins | ⚠️ Partial | ⚠️ Partial |
|
|
65
|
+
| **Lazy loading** | ✅ Yes, per-locale / per-dictionary | ✅ Yes (per-route/per-locale), need mamespace management | ✅ Yes (per-route/per-locale), need mamespace management |
|
|
66
|
+
| **Purge unused content** | ✅ Yes, per-dictionary at build time | ❌ No, can be managed manually with namespace management | ❌ No, can be managed manually with namespace management |
|
|
67
|
+
| **Management of Large Projects** | ✅ Encourages modular, suited for design-system | ✅ Modular with setup | ✅ Modular with setup |
|
|
51
68
|
|
|
52
69
|
---
|
|
53
70
|
|
|
54
|
-
|
|
71
|
+
## Deep-dive comparison
|
|
55
72
|
|
|
56
|
-
|
|
73
|
+
### 1) Architecture & scalability
|
|
57
74
|
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
60
|
-
- **Missing Translations**: i18next offers interpolation/fallbacks. However, missing translation detection typically needs extra setup or third-party plugins.
|
|
61
|
-
- **Server Components Support**: Basic usage with Next.js 13 is documented, but advanced usage (e.g., deep integration with server components, dynamic route generation) can be cumbersome.
|
|
62
|
-
- **Routing & Middleware**: Relies heavily on Next.js `Middleware` and rewrites for locale subpaths. For more complex setups, you might need to dive into advanced i18next configuration.
|
|
63
|
-
- **Setup Simplicity**: Familiar approach for those used to i18next. However, it can get more boilerplate-heavy when advanced i18n features are needed (namespaces, multiple fallback locales, etc.).
|
|
75
|
+
- **next-intl / next-i18next**: Default to **centralized catalogs** per locale (plus **namespaces** in i18next). Works fine early on, but often becomes a big shared surface area with rising coupling and key churn.
|
|
76
|
+
- **Intlayer**: Encourages **per-component** (or per-feature) dictionaries **co-located** with the code they serve. This lowers cognitive load, eases duplication/migration of UI pieces, and reduces cross-team conflicts. Unused content is naturally easier to spot and purge.
|
|
64
77
|
|
|
65
|
-
**
|
|
78
|
+
**Why it matters:** In large codebases or design-system setups, **modular content** scales better than monolithic catalogs.
|
|
66
79
|
|
|
67
80
|
---
|
|
68
81
|
|
|
69
|
-
###
|
|
82
|
+
### 2) TypeScript & safety
|
|
70
83
|
|
|
71
|
-
**
|
|
84
|
+
- **next-intl**: Solid TypeScript support, but **keys aren’t strictly typed by default**; you’ll maintain safety patterns manually.
|
|
85
|
+
- **next-i18next**: Base typings for hooks; **strict key typing requires extra tooling/config**.
|
|
86
|
+
- **Intlayer**: **Generates strict types** from your content. **IDE autocompletion** and **compile-time errors** catch typos and missing keys before deploy.
|
|
72
87
|
|
|
73
|
-
|
|
88
|
+
**Why it matters:** Strong typing shifts failures **left** (CI/build) instead of **right** (runtime).
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
---
|
|
76
91
|
|
|
77
|
-
|
|
78
|
-
- This makes your code more **modular and maintainable**, especially in large codebases.
|
|
92
|
+
### 3) Missing translation handling
|
|
79
93
|
|
|
80
|
-
|
|
94
|
+
- **next-intl / next-i18next**: Rely on **runtime fallbacks** (e.g., show the key or default locale). Build doesn’t fail.
|
|
95
|
+
- **Intlayer**: **Build-time detection** with **warnings/errors** for missing locales or keys.
|
|
81
96
|
|
|
82
|
-
|
|
83
|
-
- Minimizes runtime errors like missing keys and offers advanced **autocomplete** directly in your IDE.
|
|
97
|
+
**Why it matters:** Catching gaps during build prevents “mystery strings” in production and aligns with strict release gates.
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
---
|
|
86
100
|
|
|
87
|
-
|
|
88
|
-
- This ensures you never accidentally ship with missing text across your languages.
|
|
101
|
+
### 4) Routing, middleware & URL strategy
|
|
89
102
|
|
|
90
|
-
|
|
103
|
+
- All three work with **Next.js localized routing** on the App Router.
|
|
104
|
+
- **Intlayer** goes further with **i18n middleware** (locale detection via headers/cookies) and **helpers** to generate localized URLs and `<link rel="alternate" hreflang="…">` tags.
|
|
91
105
|
|
|
92
|
-
|
|
93
|
-
- Provides specialized providers (`IntlayerServerProvider`, `IntlayerClientProvider`) to **isolate server context** (vital when dealing with Next.js 13+).
|
|
106
|
+
**Why it matters:** Fewer custom glue layers; **consistent UX** and **clean SEO** across locales.
|
|
94
107
|
|
|
95
|
-
|
|
108
|
+
---
|
|
96
109
|
|
|
97
|
-
|
|
98
|
-
- Dynamically handles localized paths (e.g., `/en-US/about` vs. `/fr/about`) with minimal configuration.
|
|
99
|
-
- Offers helper methods like `getMultilingualUrls` for generating alternate language links (great for **SEO**).
|
|
110
|
+
### 5) Server Components (RSC) alignment
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- A wrapper plugin `withIntlayer(nextConfig)` that **injects** all environment variables and watchers for your content.
|
|
104
|
-
- **No large fallback configurations** the system is built to “just work” with minimal friction.
|
|
112
|
+
- **All** support Next.js 13+.
|
|
113
|
+
- **Intlayer** smooths the **server/client boundary** with a consistent API and providers designed for RSC, so you don’t shuttle formatters or t-functions through component trees.
|
|
105
114
|
|
|
106
|
-
|
|
115
|
+
**Why it matters:** Cleaner mental model and fewer edge cases in hybrid trees.
|
|
107
116
|
|
|
108
117
|
---
|
|
109
118
|
|
|
110
|
-
|
|
119
|
+
### 6) Performance & loading behavior
|
|
120
|
+
|
|
121
|
+
- **next-intl / next-i18next**: Partial control via **namespaces** and **route-level splits**; risk of bundling unused strings if discipline slips.
|
|
122
|
+
- **Intlayer**: **Tree-shakes** at build and **lazy-loads per dictionary/locale**. Unused content doesn’t ship.
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
| ------------------------------------- | ---------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
|
114
|
-
| **Keep translations near components** | Partial – typically one locales folder | Not default – often `public/locales` | **Yes – recommended & easy** |
|
|
115
|
-
| **TypeScript Autogenerated** | Basic TS definitions | Basic TS support | **Yes – advanced out-of-the-box** |
|
|
116
|
-
| **Missing translations detection** | Mostly fallback strings | Mostly fallback strings | **Yes – build-time checks** |
|
|
117
|
-
| **Server Components Support** | Works but not specialized | Supported but can be verbose | **Full support with specialized providers** |
|
|
118
|
-
| **Routing & Middleware** | Manually integrated with Next middleware | Provided via rewriting config | **Dedicated i18n middleware + advanced hooks** |
|
|
119
|
-
| **Setup Complexity** | Simple, minimal configuration | Traditional, can be verbose for advanced usage | **One config file & plugin** |
|
|
124
|
+
**Why it matters:** Smaller bundles and faster startup, especially on multi-locale sites.
|
|
120
125
|
|
|
121
126
|
---
|
|
122
127
|
|
|
123
|
-
|
|
128
|
+
### 7) DX, tooling & maintenance
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
- **next-intl / next-i18next**: You’ll typically wire up external platforms for translations and editorial workflows.
|
|
131
|
+
- **Intlayer**: Ships a **free Visual Editor** and **optional CMS** (Git-friendly or externalized). Plus **VSCode extension** for content authoring and **AI-assisted translations** using your own provider keys.
|
|
126
132
|
|
|
127
|
-
|
|
133
|
+
**Why it matters:** Lowers ops cost and shortens the loop between developers and content authors.
|
|
128
134
|
|
|
129
|
-
|
|
135
|
+
---
|
|
130
136
|
|
|
131
|
-
|
|
137
|
+
## When to choose which?
|
|
132
138
|
|
|
133
|
-
|
|
139
|
+
- **Choose next-intl** if you want a **minimal** solution, you’re comfortable with centralized catalogs, and your app is **small to mid-size**.
|
|
140
|
+
- **Choose next-i18next** if you need **i18next’s plugin ecosystem** (e.g., advanced ICU rules via plugins) and your team already knows i18next, accepting **more configuration** for flexibility.
|
|
141
|
+
- **Choose Intlayer** if you value **component-scoped content**, **strict TypeScript**, **build-time guarantees**, **tree-shaking**, and **batteries-included** routing/SEO/editor tooling - especially for **Next.js App Router**, design-systems and **large, modular codebases**.
|
|
134
142
|
|
|
135
|
-
|
|
143
|
+
---
|
|
136
144
|
|
|
137
|
-
|
|
145
|
+
## Interoperability with `next-intl` and `next-i18next`
|
|
138
146
|
|
|
139
|
-
|
|
147
|
+
`intlayer` can also help to manage your `next-intl` and `next-i18next` namespaces.
|
|
140
148
|
|
|
141
|
-
|
|
142
|
-
- A standard `intlayerMiddleware` does not require deep custom rewrites.
|
|
149
|
+
Using `intlayer`, you can declare your content in the format of your favorite i18n library, and intlayer will generate your namespaces in the location of your choice (example: `/messages/{{locale}}/{{namespace}}.json`).
|
|
143
150
|
|
|
144
|
-
|
|
151
|
+
Refer to [`dictionaryOutput` and `i18nextResourcesDir` options](https://intlayer.org/doc/concept/configuration#content-configuration) for more details.
|
|
145
152
|
|
|
146
|
-
|
|
147
|
-
- Clear, straightforward usage for both **server** and **client** components via `IntlayerServerProvider` and `IntlayerClientProvider`.
|
|
153
|
+
---
|
|
148
154
|
|
|
149
|
-
|
|
150
|
-
- Built-in helpers (`getMultilingualUrls`, `hrefLang` attributes, etc.) make it easy to produce SEO-compliant pages and sitemaps.
|
|
155
|
+
## GitHub STARs
|
|
151
156
|
|
|
152
|
-
|
|
157
|
+
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.
|
|
153
158
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Below is a _very_ condensed snippet illustrating how to harness Intlayer in a Next.js 15 project. For the full details and code examples, [check out the full Intlayer guide](#).
|
|
157
|
-
|
|
158
|
-
<details>
|
|
159
|
-
<summary>Step-by-step example</summary>
|
|
160
|
-
|
|
161
|
-
1. **Install & Configure**
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
npm install intlayer next-intlayer
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
```ts
|
|
168
|
-
// intlayer.config.ts
|
|
169
|
-
import { Locales, type IntlayerConfig } from "intlayer";
|
|
170
|
-
|
|
171
|
-
const config: IntlayerConfig = {
|
|
172
|
-
internationalization: {
|
|
173
|
-
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
174
|
-
defaultLocale: Locales.ENGLISH,
|
|
175
|
-
},
|
|
176
|
-
};
|
|
177
|
-
export default config;
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
2. **Use the Plugin**
|
|
181
|
-
|
|
182
|
-
```ts
|
|
183
|
-
// next.config.mjs
|
|
184
|
-
import { withIntlayer } from "next-intlayer/server";
|
|
185
|
-
|
|
186
|
-
/** @type {import('next').NextConfig} */
|
|
187
|
-
const nextConfig = {};
|
|
188
|
-
|
|
189
|
-
export default withIntlayer(nextConfig);
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
3. **Add Middleware**
|
|
193
|
-
|
|
194
|
-
```ts
|
|
195
|
-
// src/middleware.ts
|
|
196
|
-
export { intlayerMiddleware as middleware } from "next-intlayer/middleware";
|
|
197
|
-
|
|
198
|
-
export const config = {
|
|
199
|
-
matcher:
|
|
200
|
-
"/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
|
|
201
|
-
};
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
4. **Create a Localized Layout**
|
|
205
|
-
|
|
206
|
-
```tsx
|
|
207
|
-
// src/app/[locale]/layout.tsx
|
|
208
|
-
import { getHTMLTextDir } from "intlayer";
|
|
209
|
-
import { NextLayoutIntlayer } from "next-intlayer";
|
|
210
|
-
|
|
211
|
-
const LocaleLayout: NextLayoutIntlayer = async ({ children, params }) => {
|
|
212
|
-
const { locale } = params;
|
|
213
|
-
return (
|
|
214
|
-
<html lang={locale} dir={getHTMLTextDir(locale)}>
|
|
215
|
-
<body>{children}</body>
|
|
216
|
-
</html>
|
|
217
|
-
);
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
export { generateStaticParams } from "next-intlayer";
|
|
221
|
-
export default LocaleLayout;
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
5. **Declare & Use Content**
|
|
225
|
-
|
|
226
|
-
```tsx
|
|
227
|
-
// src/app/[locale]/page.content.ts
|
|
228
|
-
import { t } from "intlayer";
|
|
229
|
-
|
|
230
|
-
export default {
|
|
231
|
-
key: "page",
|
|
232
|
-
content: {
|
|
233
|
-
getStarted: {
|
|
234
|
-
main: t({
|
|
235
|
-
en: "Get started by editing",
|
|
236
|
-
fr: "Commencez par éditer",
|
|
237
|
-
es: "Comience por editar",
|
|
238
|
-
}),
|
|
239
|
-
pageLink: "src/app/page.tsx",
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
};
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
```tsx
|
|
246
|
-
// src/app/[locale]/page.tsx
|
|
247
|
-
import { IntlayerServerProvider } from "next-intlayer/server";
|
|
248
|
-
import { IntlayerClientProvider, useIntlayer } from "next-intlayer";
|
|
249
|
-
|
|
250
|
-
const PageContent = () => {
|
|
251
|
-
const { content } = useIntlayer("page");
|
|
252
|
-
return (
|
|
253
|
-
<>
|
|
254
|
-
<p>{content.getStarted.main}</p>
|
|
255
|
-
<code>{content.getStarted.pageLink}</code>
|
|
256
|
-
</>
|
|
257
|
-
);
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
export default function Page({ params }) {
|
|
261
|
-
return (
|
|
262
|
-
<IntlayerServerProvider locale={params.locale}>
|
|
263
|
-
<IntlayerClientProvider locale={params.locale}>
|
|
264
|
-
<PageContent />
|
|
265
|
-
</IntlayerClientProvider>
|
|
266
|
-
</IntlayerServerProvider>
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
</details>
|
|
159
|
+
[](https://www.star-history.com/#i18next/next-i18next&amannn/next-intl&aymericzip/intlayer)
|
|
272
160
|
|
|
273
161
|
---
|
|
274
162
|
|
|
275
163
|
## Conclusion
|
|
276
164
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
- **Strongly encouraging a component-level translation architecture**
|
|
280
|
-
- Integrating seamlessly with **Next.js 13+ and Server Components**
|
|
281
|
-
- Offering **powerful TypeScript** auto-generation for safer code
|
|
282
|
-
- Handling **missing translations** at build time
|
|
283
|
-
- Providing a **simplified, single configuration** approach with advanced routing & middleware
|
|
284
|
-
|
|
285
|
-
If you want **modern** i18n features tailored to Next.js App Router and are looking for a **fully typed** experience without manually rigging fallback logic, route rewrites, or complex build steps, **Intlayer** is a compelling choice. It not only shortens your setup time but also ensures a more maintainable, scalable approach to translations for your team.
|
|
286
|
-
|
|
287
|
-
### Further Reading
|
|
165
|
+
All three libraries succeed at core localization. The difference is **how much work you must do** to achieve a robust, scalable setup in **modern Next.js**:
|
|
288
166
|
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
- [next-i18next Documentation](https://next.i18next.com/)
|
|
167
|
+
- With **Intlayer**, **modular content**, **strict TS**, **build-time safety**, **tree-shaken bundles**, and **first-class App Router + SEO tooling** are **defaults**, not chores.
|
|
168
|
+
- If your team prizes **maintainability and speed** in a multi-locale, component-driven app, Intlayer offers the **most complete** experience today.
|
|
292
169
|
|
|
293
|
-
|
|
170
|
+
Refer to ['Why Intlayer?' doc](https://intlayer.org/doc/why) for more details.
|