@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.
Files changed (223) hide show
  1. package/blog/ar/intlayer_with_next-i18next.md +2 -2
  2. package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +96 -219
  3. package/blog/ar/react-i18next_vs_react-intl_vs_intlayer.md +88 -129
  4. package/blog/ar/vue-i18n_vs_intlayer.md +268 -0
  5. package/blog/de/intlayer_with_next-i18next.md +2 -2
  6. package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
  7. package/blog/de/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
  8. package/blog/de/vue-i18n_vs_intlayer.md +268 -0
  9. package/blog/en/intlayer_with_next-i18next.md +2 -2
  10. package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
  11. package/blog/en/react-i18next_vs_react-intl_vs_intlayer.md +88 -120
  12. package/blog/en/vue-i18n_vs_intlayer.md +276 -0
  13. package/blog/en-GB/intlayer_with_next-i18next.md +2 -2
  14. package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +85 -218
  15. package/blog/en-GB/react-i18next_vs_react-intl_vs_intlayer.md +80 -130
  16. package/blog/en-GB/vue-i18n_vs_intlayer.md +258 -0
  17. package/blog/es/intlayer_with_next-i18next.md +2 -2
  18. package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
  19. package/blog/es/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
  20. package/blog/es/vue-i18n_vs_intlayer.md +268 -0
  21. package/blog/fr/intlayer_with_next-i18next.md +2 -2
  22. package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +91 -214
  23. package/blog/fr/react-i18next_vs_react-intl_vs_intlayer.md +86 -127
  24. package/blog/fr/vue-i18n_vs_intlayer.md +269 -0
  25. package/blog/hi/intlayer_with_next-i18next.md +2 -2
  26. package/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md +97 -220
  27. package/blog/hi/react-i18next_vs_react-intl_vs_intlayer.md +89 -130
  28. package/blog/hi/vue-i18n_vs_intlayer.md +268 -0
  29. package/blog/it/intlayer_with_next-i18next.md +2 -2
  30. package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +91 -214
  31. package/blog/it/react-i18next_vs_react-intl_vs_intlayer.md +86 -127
  32. package/blog/it/vue-i18n_vs_intlayer.md +268 -0
  33. package/blog/ja/intlayer_with_next-i18next.md +2 -2
  34. package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
  35. package/blog/ja/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
  36. package/blog/ja/vue-i18n_vs_intlayer.md +268 -0
  37. package/blog/ko/intlayer_with_next-i18next.md +2 -2
  38. package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +95 -217
  39. package/blog/ko/react-i18next_vs_react-intl_vs_intlayer.md +89 -130
  40. package/blog/ko/vue-i18n_vs_intlayer.md +268 -0
  41. package/blog/pt/intlayer_with_next-i18next.md +2 -2
  42. package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
  43. package/blog/pt/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
  44. package/blog/pt/vue-i18n_vs_intlayer.md +268 -0
  45. package/blog/ru/intlayer_with_next-i18next.md +2 -2
  46. package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +94 -217
  47. package/blog/ru/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
  48. package/blog/ru/vue-i18n_vs_intlayer.md +268 -0
  49. package/blog/zh/intlayer_with_next-i18next.md +2 -2
  50. package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
  51. package/blog/zh/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
  52. package/blog/zh/vue-i18n_vs_intlayer.md +269 -0
  53. package/dist/cjs/generated/blog.entry.cjs +41 -0
  54. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  55. package/dist/esm/generated/blog.entry.mjs +41 -0
  56. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  57. package/dist/types/generated/blog.entry.d.ts +1 -0
  58. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  59. package/docs/ar/formatters.md +417 -31
  60. package/docs/ar/how_works_intlayer.md +2 -4
  61. package/docs/ar/interest_of_intlayer.md +7 -10
  62. package/docs/ar/intlayer_CMS.md +2 -3
  63. package/docs/ar/intlayer_visual_editor.md +2 -3
  64. package/docs/ar/intlayer_with_tanstack.md +1 -1
  65. package/docs/ar/introduction.md +4 -4
  66. package/docs/de/formatters.md +444 -34
  67. package/docs/de/introduction.md +2 -2
  68. package/docs/en/dictionary/enumeration.md +2 -2
  69. package/docs/en/dictionary/function_fetching.md +2 -2
  70. package/docs/en/dictionary/get_started.md +2 -2
  71. package/docs/en/dictionary/translation.md +2 -2
  72. package/docs/en/formatters.md +383 -15
  73. package/docs/en/how_works_intlayer.md +2 -4
  74. package/docs/en/interest_of_intlayer.md +48 -29
  75. package/docs/en/intlayer_CMS.md +2 -3
  76. package/docs/en/intlayer_visual_editor.md +2 -3
  77. package/docs/en/intlayer_with_create_react_app.md +2 -2
  78. package/docs/en/intlayer_with_express.md +2 -2
  79. package/docs/en/intlayer_with_tanstack.md +1 -1
  80. package/docs/en/introduction.md +4 -4
  81. package/docs/en/packages/express-intlayer/index.md +2 -2
  82. package/docs/en/packages/intlayer/getConfiguration.md +2 -3
  83. package/docs/en/packages/intlayer/getEnumeration.md +2 -7
  84. package/docs/en/packages/intlayer/getHTMLTextDir.md +2 -4
  85. package/docs/en/packages/intlayer/getLocaleLang.md +2 -4
  86. package/docs/en/packages/intlayer/getLocaleName.md +2 -3
  87. package/docs/en/packages/intlayer/getLocalizedUrl.md +2 -8
  88. package/docs/en/packages/intlayer/getMultilingualUrls.md +2 -7
  89. package/docs/en/packages/intlayer/getPathWithoutLocale.md +2 -3
  90. package/docs/en/packages/intlayer/getTranslation.md +2 -4
  91. package/docs/en/packages/intlayer/index.md +2 -2
  92. package/docs/en/packages/next-intlayer/index.md +2 -2
  93. package/docs/en/packages/next-intlayer/t.md +2 -2
  94. package/docs/en/packages/next-intlayer/useDictionary.md +2 -2
  95. package/docs/en/packages/next-intlayer/useIntlayer.md +2 -2
  96. package/docs/en/packages/next-intlayer/useLocale.md +2 -2
  97. package/docs/en/packages/react-intlayer/index.md +2 -2
  98. package/docs/en/packages/react-intlayer/t.md +2 -2
  99. package/docs/en/packages/react-intlayer/useI18n.md +2 -2
  100. package/docs/en/packages/react-intlayer/useIntlayer.md +2 -2
  101. package/docs/en/packages/react-intlayer/useLocale.md +2 -2
  102. package/docs/en/packages/react-scripts-intlayer/index.md +2 -2
  103. package/docs/en/packages/solid-intlayer/index.md +2 -2
  104. package/docs/en/packages/vite-intlayer/index.md +2 -2
  105. package/docs/en-GB/formatters.md +402 -16
  106. package/docs/en-GB/how_works_intlayer.md +2 -4
  107. package/docs/en-GB/interest_of_intlayer.md +7 -10
  108. package/docs/en-GB/intlayer_with_tanstack.md +1 -1
  109. package/docs/en-GB/introduction.md +2 -2
  110. package/docs/es/formatters.md +438 -28
  111. package/docs/es/how_works_intlayer.md +2 -4
  112. package/docs/es/interest_of_intlayer.md +7 -10
  113. package/docs/es/intlayer_with_tanstack.md +1 -1
  114. package/docs/es/introduction.md +2 -2
  115. package/docs/fr/formatters.md +438 -28
  116. package/docs/fr/how_works_intlayer.md +2 -4
  117. package/docs/fr/interest_of_intlayer.md +7 -10
  118. package/docs/fr/intlayer_with_tanstack.md +1 -1
  119. package/docs/fr/introduction.md +2 -2
  120. package/docs/hi/formatters.md +430 -39
  121. package/docs/hi/how_works_intlayer.md +2 -4
  122. package/docs/hi/interest_of_intlayer.md +7 -10
  123. package/docs/hi/intlayer_with_tanstack.md +1 -1
  124. package/docs/hi/introduction.md +2 -2
  125. package/docs/it/formatters.md +438 -30
  126. package/docs/it/how_works_intlayer.md +2 -4
  127. package/docs/it/interest_of_intlayer.md +7 -10
  128. package/docs/it/intlayer_with_tanstack.md +1 -1
  129. package/docs/it/introduction.md +2 -2
  130. package/docs/ja/formatters.md +435 -47
  131. package/docs/ja/how_works_intlayer.md +2 -4
  132. package/docs/ja/interest_of_intlayer.md +7 -10
  133. package/docs/ja/intlayer_with_tanstack.md +1 -1
  134. package/docs/ja/introduction.md +2 -2
  135. package/docs/ko/formatters.md +432 -41
  136. package/docs/ko/how_works_intlayer.md +2 -4
  137. package/docs/ko/interest_of_intlayer.md +7 -10
  138. package/docs/ko/intlayer_with_tanstack.md +1 -1
  139. package/docs/ko/introduction.md +2 -2
  140. package/docs/pt/formatters.md +416 -30
  141. package/docs/pt/how_works_intlayer.md +2 -4
  142. package/docs/pt/intlayer_with_tanstack.md +1 -1
  143. package/docs/pt/introduction.md +2 -2
  144. package/docs/ru/autoFill.md +2 -2
  145. package/docs/ru/configuration.md +1 -40
  146. package/docs/ru/formatters.md +438 -28
  147. package/docs/ru/how_works_intlayer.md +5 -7
  148. package/docs/ru/index.md +1 -1
  149. package/docs/ru/interest_of_intlayer.md +8 -11
  150. package/docs/ru/intlayer_CMS.md +7 -8
  151. package/docs/ru/intlayer_cli.md +4 -7
  152. package/docs/ru/intlayer_visual_editor.md +5 -6
  153. package/docs/ru/intlayer_with_angular.md +1 -1
  154. package/docs/ru/intlayer_with_create_react_app.md +5 -5
  155. package/docs/ru/intlayer_with_lynx+react.md +1 -1
  156. package/docs/ru/intlayer_with_nextjs_15.md +3 -3
  157. package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
  158. package/docs/ru/intlayer_with_nuxt.md +1 -1
  159. package/docs/ru/intlayer_with_react_native+expo.md +2 -2
  160. package/docs/ru/intlayer_with_tanstack.md +3 -3
  161. package/docs/ru/intlayer_with_vite+preact.md +3 -3
  162. package/docs/ru/intlayer_with_vite+react.md +3 -3
  163. package/docs/ru/intlayer_with_vite+solid.md +1 -1
  164. package/docs/ru/intlayer_with_vite+svelte.md +1 -1
  165. package/docs/ru/intlayer_with_vite+vue.md +2 -2
  166. package/docs/ru/introduction.md +5 -5
  167. package/docs/ru/locale_mapper.md +1 -1
  168. package/docs/ru/packages/@intlayer/api/index.md +2 -2
  169. package/docs/ru/packages/@intlayer/chokidar/index.md +1 -1
  170. package/docs/ru/packages/@intlayer/cli/index.md +2 -2
  171. package/docs/ru/packages/@intlayer/config/index.md +2 -2
  172. package/docs/ru/packages/@intlayer/core/index.md +2 -2
  173. package/docs/ru/packages/@intlayer/design-system/index.md +2 -2
  174. package/docs/ru/packages/@intlayer/dictionary-entry/index.md +2 -2
  175. package/docs/ru/packages/@intlayer/editor/index.md +1 -1
  176. package/docs/ru/packages/@intlayer/editor-react/index.md +1 -1
  177. package/docs/ru/packages/@intlayer/webpack/index.md +1 -1
  178. package/docs/ru/packages/angular-intlayer/index.md +1 -1
  179. package/docs/ru/packages/express-intlayer/index.md +3 -3
  180. package/docs/ru/packages/express-intlayer/t.md +1 -1
  181. package/docs/ru/packages/intlayer/getEnumeration.md +3 -8
  182. package/docs/ru/packages/intlayer/getTranslation.md +3 -5
  183. package/docs/ru/packages/intlayer/getTranslationContent.md +1 -3
  184. package/docs/ru/packages/intlayer/index.md +3 -3
  185. package/docs/ru/packages/intlayer-cli/index.md +1 -1
  186. package/docs/ru/packages/intlayer-editor/index.md +2 -2
  187. package/docs/ru/packages/lynx-intlayer/index.md +1 -1
  188. package/docs/ru/packages/next-intlayer/index.md +4 -4
  189. package/docs/ru/packages/next-intlayer/t.md +4 -4
  190. package/docs/ru/packages/next-intlayer/useLocale.md +3 -3
  191. package/docs/ru/packages/nuxt-intlayer/index.md +1 -1
  192. package/docs/ru/packages/preact-intlayer/index.md +1 -1
  193. package/docs/ru/packages/react-intlayer/index.md +4 -4
  194. package/docs/ru/packages/react-intlayer/t.md +4 -4
  195. package/docs/ru/packages/react-native-intlayer/index.md +1 -1
  196. package/docs/ru/packages/react-scripts-intlayer/index.md +3 -3
  197. package/docs/ru/packages/solid-intlayer/index.md +3 -3
  198. package/docs/ru/packages/svelte-intlayer/index.md +1 -1
  199. package/docs/ru/packages/vite-intlayer/index.md +3 -3
  200. package/docs/ru/packages/vue-intlayer/index.md +1 -1
  201. package/docs/ru/per_locale_file.md +1 -1
  202. package/docs/ru/roadmap.md +3 -5
  203. package/docs/ru/vs_code_extension.md +1 -1
  204. package/docs/zh/formatters.md +446 -38
  205. package/docs/zh/how_works_intlayer.md +2 -4
  206. package/docs/zh/interest_of_intlayer.md +7 -10
  207. package/docs/zh/intlayer_with_tanstack.md +1 -1
  208. package/docs/zh/introduction.md +2 -2
  209. package/frequent_questions/ar/domain_routing.md +1 -1
  210. package/frequent_questions/en/domain_routing.md +1 -1
  211. package/frequent_questions/en-GB/domain_routing.md +1 -1
  212. package/frequent_questions/es/domain_routing.md +1 -1
  213. package/frequent_questions/fr/domain_routing.md +1 -1
  214. package/frequent_questions/hi/domain_routing.md +1 -1
  215. package/frequent_questions/it/domain_routing.md +1 -1
  216. package/frequent_questions/ko/domain_routing.md +1 -1
  217. package/frequent_questions/pt/domain_routing.md +1 -1
  218. package/frequent_questions/ru/domain_routing.md +1 -1
  219. package/frequent_questions/ru/get_locale_cookie.md +4 -4
  220. package/frequent_questions/ru/static_rendering.md +1 -2
  221. package/frequent_questions/zh/domain_routing.md +1 -1
  222. package/package.json +9 -11
  223. package/src/generated/blog.entry.ts +42 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
- createdAt: 2024-08-11
3
- updatedAt: 2025-06-29
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 Intlayer | Next.js Internationalization (i18n)
20
+ # next-i18next VS next-intl VS intlayer | Next.js Internationalization (i18n)
21
21
 
22
- Below is a concise comparison of **three popular libraries** for internationalizing (i18n) a Next.js application: **next-intl**, **next-i18next**, and **Intlayer**.
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
- This document highlights key criteria:
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
- 1. **Architecture** (keeping translations close to their components)
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
- ## Overview of Each Library
38
-
39
- ### 1. next-intl
37
+ ## High-level positioning
40
38
 
41
- **Main Focus**: Quick and easy setup with a lightweight approach to localization.
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
- - **Architecture**: Encourages co-locating translations in a single folder (e.g., `locales/`) but also allows multiple strategies. Does not strictly enforce “translation per component” architecture.
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
- **Use when**: You want a simpler approach or are comfortable managing your translations in more conventional ways (like one folder with locale JSON files).
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
- ### 2. next-i18next
71
+ ## Deep-dive comparison
55
72
 
56
- **Main Focus**: Time-tested solution using `i18next` under the hood, widely adopted for Next.js projects.
73
+ ### 1) Architecture & scalability
57
74
 
58
- - **Architecture**: Often organizes translations in the `public/locales` folder. Not specifically designed to keep translations “close” to each component, though you can manually adopt a different structure.
59
- - **TypeScript Support**: Reasonable TypeScript coverage but requires custom configuration for typed translations and typed hooks.
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
- **Use when**: You’re already committed to the `i18next` ecosystem or have existing i18next-based translations.
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
- ### 3. Intlayer
82
+ ### 2) TypeScript & safety
70
83
 
71
- **Main Focus**: A modern, open-source i18n library specifically tailored for Next.js **App Router** (12, 13, 14, and 15) with built-in support for **Server Components** and **Turbopack**.
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
- #### Key Advantages
88
+ **Why it matters:** Strong typing shifts failures **left** (CI/build) instead of **right** (runtime).
74
89
 
75
- 1. **Architecture**
90
+ ---
76
91
 
77
- - Encourages placing **translations right next to their components**. Each page or component can have its own `.content.ts` (or JSON) file no more rummaging through a giant translation folder.
78
- - This makes your code more **modular and maintainable**, especially in large codebases.
92
+ ### 3) Missing translation handling
79
93
 
80
- 2. **TypeScript Support**
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
- - **Auto-generated type definitions**: The moment you define your content, Intlayer generates types that power autocomplete and catch translation errors.
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
- 3. **Management of Missing Translations**
99
+ ---
86
100
 
87
- - During build, Intlayer can **detect missing translation keys** and throw warnings or errors.
88
- - This ensures you never accidentally ship with missing text across your languages.
101
+ ### 4) Routing, middleware & URL strategy
89
102
 
90
- 4. **Optimized for Server Components**
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
- - Fully compatible with the Next.js **App Router** and the new **Server Components** paradigm.
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
- 5. **Enhanced Routing & Middleware**
108
+ ---
96
109
 
97
- - Includes a dedicated [**`intlayerMiddleware`**](#) for **automatic locale detection** (via cookies or browser headers) and advanced route generation.
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
- 6. **Simplified Setup**
102
- - A single config file (`intlayer.config.ts`) to define your locales, default locale, and integration preferences.
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
- > **Bottom line**: Intlayer is a modern solution that wants to **push best practices**: from **keeping translations close** to each React component, to offering **robust TS support** and **easy server-side** usage, while **drastically reducing boilerplate**.
115
+ **Why it matters:** Cleaner mental model and fewer edge cases in hybrid trees.
107
116
 
108
117
  ---
109
118
 
110
- ## Side-by-Side Feature Comparison
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
- | **Feature** | **next-intl** | **next-i18next** | **Intlayer** |
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
- ## Why Intlayer?
128
+ ### 7) DX, tooling & maintenance
124
129
 
125
- For teams migrating to or building on top of **Next.js App Router** (versions 13, 14, or 15) with **Server Components**, Intlayer provides:
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
- 1. **A Streamlined Architecture**
133
+ **Why it matters:** Lowers ops cost and shortens the loop between developers and content authors.
128
134
 
129
- - Each route or component holds its own translations. This fosters clarity and maintainability.
135
+ ---
130
136
 
131
- 2. **Powerful TypeScript Integration**
137
+ ## When to choose which?
132
138
 
133
- - You gain compiler-level safety, avoiding “typo-laden” or missing translation keys.
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
- 3. **Real Missing Translation Alerts**
143
+ ---
136
144
 
137
- - If you forget a key or language translation, you’ll be warned at build time (rather than shipping an incomplete UI).
145
+ ## Interoperability with `next-intl` and `next-i18next`
138
146
 
139
- 4. **Built-In Advanced Routing**
147
+ `intlayer` can also help to manage your `next-intl` and `next-i18next` namespaces.
140
148
 
141
- - Automatic locale detection, dynamic route generation, and easy localized URL management are included.
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
- 5. **One-Stop Setup**
151
+ Refer to [`dictionaryOutput` and `i18nextResourcesDir` options](https://intlayer.org/doc/concept/configuration#content-configuration) for more details.
145
152
 
146
- - Minimal boilerplate: simply define your `intlayer.config.ts`, wrap `next.config` with `withIntlayer`, and add the official middleware.
147
- - Clear, straightforward usage for both **server** and **client** components via `IntlayerServerProvider` and `IntlayerClientProvider`.
153
+ ---
148
154
 
149
- 6. **SEO-Friendly**
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
- ## Example: Intlayer in Action
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
+ [![Star History Chart](https://api.star-history.com/svg?repos=i18next/next-i18next&repos=amannn/next-intl&repos=aymericzip/intlayer&type=Date)](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
- Each solution **next-intl**, **next-i18next**, and **Intlayer** has proven effective for multilingual Next.js projects. However, **Intlayer** goes further by:
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
- - [Intlayer + Next.js 15 Guide](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/intlayer_with_nextjs_15.md)
290
- - [next-intl Documentation](https://formatjs.io/docs/react-intl/)
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
- Feel free to mix and match approaches to suit your requirements there is no “one-size-fits-all” solution, and each library continues to evolve to address new use cases in the React ecosystem.
170
+ Refer to ['Why Intlayer?' doc](https://intlayer.org/doc/why) for more details.