@intlayer/docs 5.5.8 → 5.5.10

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 (172) hide show
  1. package/ar/autoFill.md +1 -2
  2. package/ar/intlayer_with_create_react_app.md +1 -14
  3. package/ar/intlayer_with_nextjs_14.md +1 -14
  4. package/ar/intlayer_with_nextjs_15.md +1 -14
  5. package/ar/intlayer_with_nextjs_page_router.md +1 -13
  6. package/ar/intlayer_with_nuxt.md +792 -0
  7. package/ar/intlayer_with_react_native+expo.md +6 -3
  8. package/ar/intlayer_with_vite+preact.md +7 -18
  9. package/ar/intlayer_with_vite+react.md +7 -17
  10. package/ar/intlayer_with_vite+vue.md +25 -5
  11. package/ar/packages/nuxt-intlayer/index.md +29 -0
  12. package/ar/roadmap.md +11 -11
  13. package/de/autoFill.md +1 -2
  14. package/de/how_works_intlayer.md +1 -1
  15. package/de/intlayer_with_create_react_app.md +1 -14
  16. package/de/intlayer_with_nextjs_14.md +1 -14
  17. package/de/intlayer_with_nextjs_15.md +1 -14
  18. package/de/intlayer_with_nextjs_page_router.md +1 -13
  19. package/de/intlayer_with_nuxt.md +791 -0
  20. package/de/intlayer_with_react_native+expo.md +6 -3
  21. package/de/intlayer_with_vite+preact.md +7 -18
  22. package/de/intlayer_with_vite+react.md +7 -17
  23. package/de/intlayer_with_vite+vue.md +84 -62
  24. package/de/packages/nuxt-intlayer/index.md +29 -0
  25. package/de/roadmap.md +11 -11
  26. package/en/autoFill.md +1 -2
  27. package/en/how_works_intlayer.md +17 -3
  28. package/en/intlayer_with_angular.md +535 -6
  29. package/en/intlayer_with_create_react_app.md +1 -14
  30. package/en/intlayer_with_nextjs_14.md +193 -59
  31. package/en/intlayer_with_nextjs_15.md +192 -61
  32. package/en/intlayer_with_nextjs_page_router.md +396 -61
  33. package/en/intlayer_with_nuxt.md +737 -0
  34. package/en/intlayer_with_react_native+expo.md +6 -3
  35. package/en/intlayer_with_vite+preact.md +8 -27
  36. package/en/intlayer_with_vite+react.md +7 -17
  37. package/en/intlayer_with_vite+solid.md +6 -3
  38. package/en/intlayer_with_vite+svelte.md +6 -3
  39. package/en/intlayer_with_vite+vue.md +17 -6
  40. package/en/packages/nuxt-intlayer/index.md +31 -0
  41. package/en/roadmap.md +13 -13
  42. package/en/t.md +5 -5
  43. package/en-GB/how_works_intlayer.md +16 -4
  44. package/en-GB/intlayer_with_create_react_app.md +1 -14
  45. package/en-GB/intlayer_with_nextjs_14.md +1 -14
  46. package/en-GB/intlayer_with_nextjs_15.md +1 -14
  47. package/en-GB/intlayer_with_nextjs_page_router.md +1 -13
  48. package/en-GB/intlayer_with_nuxt.md +795 -0
  49. package/en-GB/intlayer_with_react_native+expo.md +6 -3
  50. package/en-GB/intlayer_with_vite+preact.md +7 -18
  51. package/en-GB/intlayer_with_vite+react.md +6 -9
  52. package/en-GB/intlayer_with_vite+vue.md +65 -59
  53. package/en-GB/packages/nuxt-intlayer/index.md +31 -0
  54. package/en-GB/roadmap.md +11 -11
  55. package/es/autoFill.md +1 -2
  56. package/es/how_works_intlayer.md +1 -1
  57. package/es/intlayer_with_create_react_app.md +1 -14
  58. package/es/intlayer_with_nextjs_14.md +1 -14
  59. package/es/intlayer_with_nextjs_15.md +1 -14
  60. package/es/intlayer_with_nextjs_page_router.md +1 -13
  61. package/es/intlayer_with_nuxt.md +731 -0
  62. package/es/intlayer_with_react_native+expo.md +6 -3
  63. package/es/intlayer_with_vite+preact.md +7 -18
  64. package/es/intlayer_with_vite+react.md +7 -17
  65. package/es/intlayer_with_vite+vue.md +64 -51
  66. package/es/packages/nuxt-intlayer/index.md +29 -0
  67. package/fr/autoFill.md +1 -2
  68. package/fr/how_works_intlayer.md +1 -1
  69. package/fr/intlayer_with_create_react_app.md +1 -14
  70. package/fr/intlayer_with_nextjs_14.md +1 -14
  71. package/fr/intlayer_with_nextjs_15.md +1 -14
  72. package/fr/intlayer_with_nextjs_page_router.md +1 -13
  73. package/fr/intlayer_with_nuxt.md +731 -0
  74. package/fr/intlayer_with_react_native+expo.md +6 -3
  75. package/fr/intlayer_with_vite+preact.md +7 -18
  76. package/fr/intlayer_with_vite+react.md +7 -17
  77. package/fr/intlayer_with_vite+vue.md +30 -15
  78. package/fr/packages/nuxt-intlayer/index.md +29 -0
  79. package/fr/roadmap.md +11 -11
  80. package/hi/autoFill.md +1 -2
  81. package/hi/how_works_intlayer.md +1 -1
  82. package/hi/intlayer_with_create_react_app.md +1 -14
  83. package/hi/intlayer_with_nextjs_14.md +1 -14
  84. package/hi/intlayer_with_nextjs_15.md +1 -14
  85. package/hi/intlayer_with_nextjs_page_router.md +1 -13
  86. package/hi/intlayer_with_nuxt.md +784 -0
  87. package/hi/intlayer_with_react_native+expo.md +6 -3
  88. package/hi/intlayer_with_vite+preact.md +7 -18
  89. package/hi/intlayer_with_vite+react.md +7 -17
  90. package/hi/intlayer_with_vite+vue.md +59 -47
  91. package/hi/packages/nuxt-intlayer/index.md +29 -0
  92. package/hi/roadmap.md +11 -11
  93. package/index.cjs +30 -0
  94. package/index.d.ts +2 -0
  95. package/it/autoFill.md +1 -2
  96. package/it/how_works_intlayer.md +1 -1
  97. package/it/intlayer_with_create_react_app.md +0 -6
  98. package/it/intlayer_with_nextjs_14.md +1 -14
  99. package/it/intlayer_with_nextjs_15.md +1 -14
  100. package/it/intlayer_with_nextjs_page_router.md +1 -13
  101. package/it/intlayer_with_nuxt.md +793 -0
  102. package/it/intlayer_with_react_native+expo.md +6 -3
  103. package/it/intlayer_with_vite+preact.md +7 -18
  104. package/it/intlayer_with_vite+react.md +7 -17
  105. package/it/intlayer_with_vite+vue.md +26 -17
  106. package/it/packages/nuxt-intlayer/index.md +29 -0
  107. package/it/roadmap.md +11 -11
  108. package/ja/autoFill.md +1 -2
  109. package/ja/how_works_intlayer.md +1 -1
  110. package/ja/intlayer_with_create_react_app.md +1 -14
  111. package/ja/intlayer_with_nextjs_14.md +1 -14
  112. package/ja/intlayer_with_nextjs_15.md +1 -14
  113. package/ja/intlayer_with_nextjs_page_router.md +1 -13
  114. package/ja/intlayer_with_nuxt.md +792 -0
  115. package/ja/intlayer_with_react_native+expo.md +6 -3
  116. package/ja/intlayer_with_vite+preact.md +7 -18
  117. package/ja/intlayer_with_vite+react.md +7 -17
  118. package/ja/intlayer_with_vite+vue.md +68 -63
  119. package/ja/packages/nuxt-intlayer/index.md +29 -0
  120. package/ja/roadmap.md +11 -11
  121. package/ko/autoFill.md +1 -2
  122. package/ko/how_works_intlayer.md +1 -1
  123. package/ko/intlayer_with_create_react_app.md +1 -14
  124. package/ko/intlayer_with_nextjs_14.md +1 -14
  125. package/ko/intlayer_with_nextjs_15.md +1 -14
  126. package/ko/intlayer_with_nextjs_page_router.md +1 -13
  127. package/ko/intlayer_with_nuxt.md +784 -0
  128. package/ko/intlayer_with_react_native+expo.md +6 -3
  129. package/ko/intlayer_with_vite+preact.md +7 -18
  130. package/ko/intlayer_with_vite+react.md +7 -17
  131. package/ko/intlayer_with_vite+vue.md +69 -59
  132. package/ko/packages/nuxt-intlayer/index.md +31 -0
  133. package/ko/roadmap.md +11 -11
  134. package/package.json +4 -4
  135. package/pt/autoFill.md +1 -2
  136. package/pt/how_works_intlayer.md +1 -1
  137. package/pt/intlayer_with_create_react_app.md +1 -14
  138. package/pt/intlayer_with_nextjs_14.md +1 -14
  139. package/pt/intlayer_with_nextjs_15.md +1 -14
  140. package/pt/intlayer_with_nextjs_page_router.md +1 -13
  141. package/pt/intlayer_with_nuxt.md +792 -0
  142. package/pt/intlayer_with_react_native+expo.md +6 -3
  143. package/pt/intlayer_with_vite+preact.md +7 -18
  144. package/pt/intlayer_with_vite+react.md +7 -17
  145. package/pt/intlayer_with_vite+vue.md +23 -19
  146. package/pt/packages/nuxt-intlayer/index.md +29 -0
  147. package/pt/roadmap.md +11 -11
  148. package/ru/autoFill.md +1 -2
  149. package/ru/how_works_intlayer.md +1 -1
  150. package/ru/intlayer_with_create_react_app.md +1 -14
  151. package/ru/intlayer_with_nextjs_14.md +1 -14
  152. package/ru/intlayer_with_nextjs_15.md +1 -14
  153. package/ru/intlayer_with_nextjs_page_router.md +1 -13
  154. package/ru/intlayer_with_nuxt.md +792 -0
  155. package/ru/intlayer_with_react_native+expo.md +6 -3
  156. package/ru/intlayer_with_vite+preact.md +7 -18
  157. package/ru/intlayer_with_vite+react.md +7 -17
  158. package/ru/intlayer_with_vite+vue.md +25 -17
  159. package/ru/packages/nuxt-intlayer/index.md +31 -0
  160. package/ru/roadmap.md +11 -11
  161. package/zh/autoFill.md +1 -2
  162. package/zh/intlayer_with_create_react_app.md +1 -14
  163. package/zh/intlayer_with_nextjs_14.md +1 -14
  164. package/zh/intlayer_with_nextjs_15.md +1 -14
  165. package/zh/intlayer_with_nextjs_page_router.md +1 -13
  166. package/zh/intlayer_with_nuxt.md +784 -0
  167. package/zh/intlayer_with_react_native+expo.md +6 -3
  168. package/zh/intlayer_with_vite+preact.md +7 -18
  169. package/zh/intlayer_with_vite+react.md +7 -17
  170. package/zh/intlayer_with_vite+vue.md +68 -57
  171. package/zh/packages/nuxt-intlayer/index.md +31 -0
  172. package/zh/roadmap.md +11 -11
@@ -20,15 +20,18 @@ With Intlayer, you can:
20
20
  From your React Native project, install the following packages:
21
21
 
22
22
  ```bash packageManager="npm"
23
- npm install intlayer react-intlayer react-native-intlayer
23
+ npm install intlayer react-intlayer
24
+ npm install --save-dev react-native-intlayer
24
25
  ```
25
26
 
26
27
  ```bash packageManager="pnpm"
27
- pnpm add intlayer react-intlayer react-native-intlayer
28
+ pnpm add intlayer react-intlayer
29
+ pnpm add --save-dev react-native-intlayer
28
30
  ```
29
31
 
30
32
  ```bash packageManager="yarn"
31
- yarn add intlayer react-intlayer react-native-intlayer
33
+ yarn add intlayer react-intlayer
34
+ yarn add --save-dev react-native-intlayer
32
35
  ```
33
36
 
34
37
  ### Packages
@@ -24,15 +24,18 @@ With Intlayer, you can:
24
24
  Install the necessary packages using npm:
25
25
 
26
26
  ```bash packageManager="npm"
27
- npm install intlayer preact-intlayer vite-intlayer
27
+ npm install intlayer preact-intlayer
28
+ npm install --save-dev vite-intlayer
28
29
  ```
29
30
 
30
31
  ```bash packageManager="pnpm"
31
- pnpm add intlayer preact-intlayer vite-intlayer
32
+ pnpm add intlayer preact-intlayer
33
+ pnpm add --save-dev vite-intlayer
32
34
  ```
33
35
 
34
36
  ```bash packageManager="yarn"
35
- yarn add intlayer preact-intlayer vite-intlayer
37
+ yarn add intlayer preact-intlayer
38
+ yarn add --save-dev vite-intlayer
36
39
  ```
37
40
 
38
41
  - **intlayer**
@@ -515,13 +518,7 @@ module.exports = App;
515
518
  > If you want to use your content in a `string` attribute, such as `alt`, `title`, `href`, `aria-label`, etc., you must call the value of the function, like:
516
519
 
517
520
  > ```jsx
518
- >
519
- > ```
520
-
521
521
  > <img src={content.image.src.value} alt={content.image.value} />
522
-
523
- > ```
524
- >
525
522
  > ```
526
523
 
527
524
  > Note: In Preact, `className` is typically written as `class`.
@@ -1245,23 +1242,15 @@ module.exports = LocaleSwitcher;
1245
1242
  ```
1246
1243
 
1247
1244
  > Documentation references:
1248
-
1245
+ >
1249
1246
  > - [`useLocale` hook](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/react-intlayer/useLocale.md) (API is similar for `preact-intlayer`)
1250
-
1251
1247
  > - [`getLocaleName` hook](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/intlayer/getLocaleName.md)
1252
-
1253
1248
  > - [`getLocalizedUrl` hook](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/intlayer/getLocalizedUrl.md)
1254
-
1255
1249
  > - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/intlayer/getHTMLTextDir.md)
1256
-
1257
1250
  > - [`hreflang` attribute](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
1258
-
1259
1251
  > - [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
1260
-
1261
1252
  > - [`dir` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
1262
-
1263
1253
  > - [`aria-current` attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
1264
-
1265
1254
  > - [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
1266
1255
 
1267
1256
  Below is the updated **Step 9** with added explanations and refined code examples:
@@ -24,15 +24,18 @@ With Intlayer, you can:
24
24
  Install the necessary packages using npm:
25
25
 
26
26
  ```bash packageManager="npm"
27
- npm install intlayer react-intlayer vite-intlayer
27
+ npm install intlayer react-intlayer
28
+ npm install --save-dev vite-intlayer
28
29
  ```
29
30
 
30
31
  ```bash packageManager="pnpm"
31
- pnpm add intlayer react-intlayer vite-intlayer
32
+ pnpm add intlayer react-intlayer
33
+ pnpm add --save-dev vite-intlayer
32
34
  ```
33
35
 
34
36
  ```bash packageManager="yarn"
35
- yarn add intlayer react-intlayer vite-intlayer
37
+ yarn add intlayer react-intlayer
38
+ yarn add --save-dev vite-intlayer
36
39
  ```
37
40
 
38
41
  - **intlayer**
@@ -561,13 +564,7 @@ module.exports = App;
561
564
  > If you want to use your content in a `string` attribute, such as `alt`, `title`, `href`, `aria-label`, etc., you must call the value of the function, like:
562
565
 
563
566
  > ```jsx
564
- >
565
- > ```
566
-
567
567
  > <img src={content.image.src.value} alt={content.image.value} />
568
-
569
- > ```
570
- >
571
568
  > ```
572
569
 
573
570
  > To Learn more about the `useIntlayer` hook, refer to the [documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/packages/react-intlayer/useIntlayer.md).
@@ -24,15 +24,18 @@ With Intlayer, you can:
24
24
  Install the necessary packages using npm:
25
25
 
26
26
  ```bash packageManager="npm"
27
- npm install intlayer vue-intlayer vite-intlayer
27
+ npm install intlayer vue-intlayer
28
+ npm install --save-dev vite-intlayer
28
29
  ```
29
30
 
30
31
  ```bash packageManager="pnpm"
31
- pnpm add intlayer vue-intlayer vite-intlayer
32
+ pnpm add intlayer vue-intlayer
33
+ pnpm add --save-dev vite-intlayer
32
34
  ```
33
35
 
34
36
  ```bash packageManager="yarn"
35
- yarn add intlayer vue-intlayer vite-intlayer
37
+ yarn add intlayer vue-intlayer
38
+ yarn add --save-dev vite-intlayer
36
39
  ```
37
40
 
38
41
  - **intlayer**
@@ -261,52 +264,61 @@ const helloWorldContent = {
261
264
  export default helloWorldContent;
262
265
  ```
263
266
 
264
- ---
265
-
267
+ ```javascript fileName="src/helloWorld.content.cjs" contentDeclarationFormat="commonjs"
266
268
  const { t } = require("intlayer");
267
269
 
268
- /\*_ @type {import('intlayer').Dictionary} _/
270
+ /** @type {import('intlayer').Dictionary} */
269
271
  const appContent = {
270
- key: "helloworld",
271
- content: {
272
- count: t({ 'en-GB': "count is ", en: "count is ", fr: "le compte est ", es: "el recuento es " }),
273
- edit: t({
274
- 'en-GB': "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
275
- en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
276
- fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
277
- es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
278
- }),
279
- checkOut: t({ 'en-GB': "Check out ", en: "Check out ", fr: "Vérifiez ", es: "Compruebe " }),
280
- officialStarter: t({
281
- 'en-GB': "the official Vue + Vite starter",
282
- en: "the official Vue + Vite starter",
283
- fr: "le starter officiel Vue + Vite",
284
- es: "el starter oficial Vue + Vite",
285
- }),
286
- learnMore: t({
287
- 'en-GB': "Learn more about IDE Support for Vue in the ",
288
- en: "Learn more about IDE Support for Vue in the ",
289
- fr: "En savoir plus sur le support IDE pour Vue dans le ",
290
- es: "Aprenda más sobre el soporte IDE para Vue en el ",
291
- }),
292
- vueDocs: t({
293
- 'en-GB': "Vue Docs Scaling up Guide",
294
- en: "Vue Docs Scaling up Guide",
295
- fr: "Vue Docs Scaling up Guide",
296
- es: "Vue Docs Scaling up Guide",
297
- }),
298
- readTheDocs: t({
299
- 'en-GB': "Click on the Vite and Vue logos to learn more",
300
- en: "Click on the Vite and Vue logos to learn more",
301
- fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
302
- es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
303
- }),
304
- },
272
+ key: "helloworld",
273
+ content: {
274
+ count: t({
275
+ "en-GB": "count is ",
276
+ en: "count is ",
277
+ fr: "le compte est ",
278
+ es: "el recuento es ",
279
+ }),
280
+ edit: t({
281
+ "en-GB":
282
+ "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
283
+ en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
284
+ fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
285
+ es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
286
+ }),
287
+ checkOut: t({
288
+ "en-GB": "Check out ",
289
+ en: "Check out ",
290
+ fr: "Vérifiez ",
291
+ es: "Compruebe ",
292
+ }),
293
+ officialStarter: t({
294
+ "en-GB": "the official Vue + Vite starter",
295
+ en: "the official Vue + Vite starter",
296
+ fr: "le starter officiel Vue + Vite",
297
+ es: "el starter oficial Vue + Vite",
298
+ }),
299
+ learnMore: t({
300
+ "en-GB": "Learn more about IDE Support for Vue in the ",
301
+ en: "Learn more about IDE Support for Vue in the ",
302
+ fr: "En savoir plus sur le support IDE pour Vue dans le ",
303
+ es: "Aprenda más sobre el soporte IDE para Vue en el ",
304
+ }),
305
+ vueDocs: t({
306
+ "en-GB": "Vue Docs Scaling up Guide",
307
+ en: "Vue Docs Scaling up Guide",
308
+ fr: "Vue Docs Scaling up Guide",
309
+ es: "Vue Docs Scaling up Guide",
310
+ }),
311
+ readTheDocs: t({
312
+ "en-GB": "Click on the Vite and Vue logos to learn more",
313
+ en: "Click on the Vite and Vue logos to learn more",
314
+ fr: "Cliquez sur les logos Vite et Vue pour en savoir plus",
315
+ es: "Haga clic en los logotipos de Vite y Vue para obtener más información",
316
+ }),
317
+ },
305
318
  };
306
319
 
307
320
  module.exports = appContent;
308
-
309
- ````
321
+ ```
310
322
 
311
323
  ```json fileName="src/helloWorld.content.json" contentDeclarationFormat="json"
312
324
  {
@@ -378,7 +390,7 @@ module.exports = appContent;
378
390
  }
379
391
  }
380
392
  }
381
- ````
393
+ ```
382
394
 
383
395
  > Your content declarations can be defined anywhere in your application as long as they are included in the `contentDir` directory (by default, `./src`). They must also match the content declaration file extension (by default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
384
396
 
@@ -446,23 +458,18 @@ const count = ref(0);
446
458
  </template>
447
459
  ```
448
460
 
449
- > If you want to use your content in an attribute, such as `alt`, `title`, `href`, `aria-label`, etc., you must call the value of the function with `.value`, like:
450
-
451
- > ```html
452
- >
453
- > ```
461
+ #### Accessing Content in Intlayer Intlayer offers different APIs to access your content
454
462
 
455
- > <img src="./logo.svg" :alt="content.image.value" />
456
-
457
- > ```
458
- >
459
- > ```
463
+ - **Component-based syntax** (recommended): Use the `<myContent />`, or `<Component :is="myContent" />` syntax to render content as an Intlayer Node. This integrates seamlessly with the [Visual Editor](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/intlayer_visual_editor.md) and [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/en-GB/intlayer_CMS.md).
464
+ - **String-based syntax**: Use `{{ myContent }}` to render the content as plain text, without Visual Editor support.
465
+ - **Raw HTML syntax**: Use `<div v-html="myContent" />` to render the content as raw HTML, without Visual Editor support.
466
+ - **Destructuration syntax**: The `useIntlayer` composable returns a Proxy with the content. This proxy can be destructured to access the content while maintaining reactivity.
467
+ - Use `const content = useIntlayer("myContent");` and `{{ content.myContent }}` / `<content.myContent />`.
468
+ - Or use `const { myContent } = useIntlayer("myContent");` and `{{ myContent }}` / `<myContent />` to destructure the content.
460
469
 
461
470
  ### (Optional) Step 6: Change the language of your content
462
471
 
463
- To change the language of your content, you can use the `setLocale` function provided by the `useLocale` composable. This function allows you to set the locale of the application and update the content accordingly.
464
-
465
- Create a component to switch between languages:
472
+ To change the language of your content, you can use the `setLocale` function provided by the `useLocale` composable. This function allows you to set the locale of the application and update the content accordingly. Create a component to switch between languages:
466
473
 
467
474
  ```vue fileName="src/components/LocaleSwitcher.vue"
468
475
  <template>
@@ -533,7 +540,6 @@ Example:
533
540
 
534
541
  ```plaintext
535
542
  - https://example.com/about
536
-
537
543
  - https://example.com/en-GB/about
538
544
  - https://example.com/fr/about
539
545
  ```
@@ -843,7 +849,7 @@ useI18nHTMLAttributes();
843
849
 
844
850
  ### (Optional) Step 10: Creating a Localised Link Component
845
851
 
846
- To ensure that your applications navigation respects the current locale, you can create a custom `Link` component. This component automatically prefixes internal URLs with the current language, so that, for example, when a French-speaking user clicks on a link to the "About" page, they are redirected to `/fr/about` instead of `/about`.
852
+ To ensure that your application's navigation respects the current locale, you can create a custom `Link` component. This component automatically prefixes internal URLs with the current language, so that, for example, when a French-speaking user clicks on a link to the "About" page, they are redirected to `/fr/about` instead of `/about`.
847
853
 
848
854
  This behaviour is useful for several reasons:
849
855
 
@@ -0,0 +1,31 @@
1
+ # nuxt-intlayer: NPM Package to internationalise (i18n) a Vue application
2
+
3
+ **Intlayer** is a suite of packages designed specifically for JavaScript developers. It is compatible with frameworks like Vue, Vue, and Express.js.
4
+
5
+ **The `nuxt-intlayer` package** allows you to internationalise your Vue application. It provides context providers and hooks for Vue internationalisation.
6
+
7
+ ## Why Internationalise Your Vue Application?
8
+
9
+ Internationalising your Vue application is essential for serving a global audience effectively. It allows your application to deliver content and messages in the preferred language of each user. This capability enhances user experience and broadens your application's reach by making it more accessible and relevant to people from different linguistic backgrounds.
10
+
11
+ ## Why to integrate Intlayer?
12
+
13
+ - **JavaScript-Powered Content Management**: Harness the flexibility of JavaScript to define and manage your content efficiently.
14
+ - **Type-Safe Environment**: Leverage TypeScript to ensure all your content definitions are precise and error-free.
15
+ - **Integrated Content Files**: Keep your translations close to their respective components, enhancing maintainability and clarity.
16
+
17
+ ## Installation
18
+
19
+ Install the necessary package using your preferred package manager:
20
+
21
+ ```bash packageManager="npm"
22
+ npm install nuxt-intlayer
23
+ ```
24
+
25
+ ```bash packageManager="yarn"
26
+ yarn add nuxt-intlayer
27
+ ```
28
+
29
+ ```bash packageManager="pnpm"
30
+ pnpm add nuxt-intlayer
31
+ ```
package/en-GB/roadmap.md CHANGED
@@ -14,7 +14,7 @@ Intlayer is a content management and internationalization solution designed to s
14
14
  - **Distributed**: Alternatively, split your content into separate files at the component or feature level for better maintainability. This keeps your content close to the relevant code (components, tests, Storybook, etc.). Removing a component ensures any associated content is also removed, preventing leftover data from cluttering your codebase.
15
15
 
16
16
  > Resources:
17
-
17
+ >
18
18
  > - [Content Declaration](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/dictionary/get_started.md)
19
19
 
20
20
  ### 2. Internationalization
@@ -23,7 +23,7 @@ Intlayer is a content management and internationalization solution designed to s
23
23
  - Easily manage translations for all these locales from one place.
24
24
 
25
25
  > Resources:
26
-
26
+ >
27
27
  > - [Internationalization](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/dictionary/translation.md)
28
28
 
29
29
  ### 3. Markdown Support
@@ -32,7 +32,7 @@ Intlayer is a content management and internationalization solution designed to s
32
32
  - Ideal for blog posts, articles, documentation pages, or any scenario where rich text formatting is needed.
33
33
 
34
34
  > Resources:
35
-
35
+ >
36
36
  > - [Markdown](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/dictionary/markdown.md)
37
37
 
38
38
  ### 4. Conditional Rendering
@@ -41,7 +41,7 @@ Intlayer is a content management and internationalization solution designed to s
41
41
  - Helps tailor personalized experiences without duplicating content across multiple files.
42
42
 
43
43
  > Resources:
44
-
44
+ >
45
45
  > - [Conditional Rendering](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/dictionary/condition.md)
46
46
 
47
47
  ### 5. Content Declaration Formats
@@ -86,7 +86,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
86
86
  - Fully compatible with the new Next.js Turbopack as well as traditional Webpack.
87
87
 
88
88
  > Resources:
89
-
89
+ >
90
90
  > - [Next.js](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_with_nextjs_15.md)
91
91
 
92
92
  ### 2. Vite
@@ -94,7 +94,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
94
94
  - Similar to Next.js, you can integrate Intlayer with Vite and use a **middleware** to redirect users to content based on their preferred language.
95
95
 
96
96
  > Resources:
97
-
97
+ >
98
98
  > - [Vite](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_with_vite+react.md)
99
99
 
100
100
  ### 3. Express
@@ -103,7 +103,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
103
103
  - Personalize emails, error messages, push notifications, and more with localized text.
104
104
 
105
105
  > Resources:
106
-
106
+ >
107
107
  > - [Express](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_with_express.md)
108
108
 
109
109
  ---
@@ -120,7 +120,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
120
120
  - Can be hosted locally or deployed on a remote server.
121
121
 
122
122
  > Resources:
123
-
123
+ >
124
124
  > - [Visual Editor](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_visual_editor.md)
125
125
 
126
126
  ### 2. Intlayer CMS (Remote)
@@ -130,7 +130,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
130
130
  - Interact with your content via your live application interface.
131
131
 
132
132
  > Resources:
133
-
133
+ >
134
134
  > - [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_CMS.md)
135
135
 
136
136
  ---
@@ -142,7 +142,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
142
142
  - Useful for **CI/CD pipelines**, ensuring your content is always synchronized with your code.
143
143
 
144
144
  > Resources:
145
-
145
+ >
146
146
  > - [CLI](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_cli.md)
147
147
 
148
148
  ---
@@ -159,7 +159,7 @@ Intlayer supports **TypeScript** (also JavaScript) and **JSON** for declaring co
159
159
  - When using remote dictionaries and the Intlayer CMS, you can **update your application’s content on the fly**, without needing to redeploy.
160
160
 
161
161
  > Resources:
162
-
162
+ >
163
163
  > - [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/{{locale}}/intlayer_CMS.md)
164
164
 
165
165
  ---
package/es/autoFill.md CHANGED
@@ -67,9 +67,8 @@ src/components/example/example.filled.content.ts
67
67
  ```
68
68
 
69
69
  > La generación de archivos `.js`, `.ts` y similares funciona de la siguiente manera:
70
-
70
+ >
71
71
  > - Si el archivo ya existe, Intlayer lo analizará usando el AST (Árbol de Sintaxis Abstracta) para localizar cada campo e insertar las traducciones faltantes.
72
-
73
72
  > - Si el archivo no existe, Intlayer lo generará usando la plantilla predeterminada para archivos de declaración de contenido.
74
73
 
75
74
  ## Rutas Absolutas
@@ -196,7 +196,7 @@ El paquete `@intlayer/editor-react` proporciona estados, contextos, hooks y comp
196
196
 
197
197
  El paquete `@intlayer/babel` proporciona herramientas que optimizan el empaquetado de diccionarios para aplicaciones basadas en Vite y Webpack.
198
198
 
199
- ### @intlayer/swc (WIP)
199
+ ### @intlayer/swc
200
200
 
201
201
  El paquete `@intlayer/swc` proporciona herramientas que optimizan el empaquetado de diccionarios para aplicaciones Next.js.
202
202
 
@@ -325,13 +325,7 @@ const App = () => (
325
325
  > Nota: Si deseas usar tu contenido en un atributo `string`, como `alt`, `title`, `href`, `aria-label`, etc., debes llamar al valor de la función, como:
326
326
 
327
327
  > ```jsx
328
- >
329
- > ```
330
-
331
328
  > <img src={content.image.src.value} alt={content.image.value} />
332
-
333
- > ```
334
- >
335
329
  > ```
336
330
 
337
331
  > Para aprender más sobre el hook `useIntlayer`, consulta la [documentación](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/react-intlayer/useIntlayer.md).
@@ -973,21 +967,14 @@ const LocaleSwitcher = () => {
973
967
  ```
974
968
 
975
969
  > Referencias de documentación:
976
-
970
+ >
977
971
  > - [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/react-intlayer/useLocale.md)
978
-
979
972
  > - [Hook `getLocaleName`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocaleName.md)
980
-
981
973
  > - [Hook `getLocalizedUrl`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocalizedUrl.md)
982
-
983
974
  > - [Hook `getHTMLTextDir`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getHTMLTextDir.md)
984
-
985
975
  > - [Atributo `hrefLang`](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
986
-
987
976
  > - [Atributo `lang`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
988
-
989
977
  > - [Atributo `dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
990
-
991
978
  > - [Atributo `aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
992
979
 
993
980
  ### (Opcional) Paso 9: Cambiar los atributos de idioma y dirección del HTML
@@ -568,13 +568,7 @@ const ServerComponentExample = () => {
568
568
  > Si deseas usar tu contenido en un atributo `string`, como `alt`, `title`, `href`, `aria-label`, etc., debes llamar al valor de la función, como:
569
569
 
570
570
  > ```jsx
571
- >
572
- > ```
573
-
574
571
  > <img src={content.image.src.value} alt={content.image.value} />
575
-
576
- > ```
577
- >
578
572
  > ```
579
573
 
580
574
  > Para aprender más sobre el hook `useIntlayer`, consulta la [documentación](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/next-intlayer/useIntlayer.md).
@@ -1042,21 +1036,14 @@ const LocaleSwitcher = () => {
1042
1036
  ```
1043
1037
 
1044
1038
  > Referencias de documentación:
1045
-
1039
+ >
1046
1040
  > - [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/next-intlayer/useLocale.md)
1047
-
1048
1041
  > - [Hook `getLocaleName`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocaleName.md)
1049
-
1050
1042
  > - [Hook `getLocalizedUrl`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocalizedUrl.md)
1051
-
1052
1043
  > - [Hook `getHTMLTextDir`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getHTMLTextDir.md)
1053
-
1054
1044
  > - [Atributo `hrefLang`](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=es)
1055
-
1056
1045
  > - [Atributo `lang`](https://developer.mozilla.org/es/docs/Web/HTML/Global_attributes/lang)
1057
-
1058
1046
  > - [Atributo `dir`](https://developer.mozilla.org/es/docs/Web/HTML/Global_attributes/dir)
1059
-
1060
1047
  > - [Atributo `aria-current`](https://developer.mozilla.org/es/docs/Web/Accessibility/ARIA/Attributes/aria-current)
1061
1048
 
1062
1049
  ### (Opcional) Paso 11: Crear un componente de enlace localizado
@@ -582,13 +582,7 @@ const ServerComponentExample = () => {
582
582
  > Si deseas usar tu contenido en un atributo `string`, como `alt`, `title`, `href`, `aria-label`, etc., debes llamar al valor de la función, como:
583
583
 
584
584
  > ```jsx
585
- >
586
- > ```
587
-
588
585
  > <img src={content.image.src.value} alt={content.image.value} />
589
-
590
- > ```
591
- >
592
586
  > ```
593
587
 
594
588
  > Para aprender más sobre el hook `useIntlayer`, consulta la [documentación](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/next-intlayer/useIntlayer.md).
@@ -1097,21 +1091,14 @@ export const LocaleSwitcher = () => {
1097
1091
  ```
1098
1092
 
1099
1093
  > Referencias de documentación:
1100
-
1094
+ >
1101
1095
  > - [Hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/next-intlayer/useLocale.md)
1102
-
1103
1096
  > - [Hook `getLocaleName`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocaleName.md)
1104
-
1105
1097
  > - [Hook `getLocalizedUrl`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocalizedUrl.md)
1106
-
1107
1098
  > - [Hook `getHTMLTextDir`](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getHTMLTextDir.md)
1108
-
1109
1099
  > - [Atributo `hrefLang`](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
1110
-
1111
1100
  > - [Atributo `lang`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
1112
-
1113
1101
  > - [Atributo `dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
1114
-
1115
1102
  > - [Atributo `aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
1116
1103
 
1117
1104
  ### (Opcional) Paso 11: Crear un componente de enlace localizado
@@ -530,13 +530,7 @@ const ComponentExample = () => {
530
530
  > Al usar traducciones en atributos de tipo `string` (por ejemplo, `alt`, `title`, `href`, `aria-label`), llama al valor de la función de la siguiente manera:
531
531
 
532
532
  > ```jsx
533
- >
534
- > ```
535
-
536
533
  > <img src={content.image.src.value} alt={content.image.value} />
537
-
538
- > ```
539
- >
540
534
  > ```
541
535
 
542
536
  > Para aprender más sobre el hook `useIntlayer`, consulta la [documentación](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/next-intlayer/useIntlayer.md).
@@ -866,19 +860,13 @@ const LocaleSwitcher = () => {
866
860
  > La API `useLocalePageRouter` es la misma que `useLocale`. Para aprender más sobre el hook `useLocale`, consulta la [documentación](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/next-intlayer/useLocale.md).
867
861
 
868
862
  > Referencias de la documentación:
869
-
863
+ >
870
864
  > - [`getLocaleName` hook](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocaleName.md)
871
-
872
865
  > - [`getLocalizedUrl` hook](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getLocalizedUrl.md)
873
-
874
866
  > - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/es/packages/intlayer/getHTMLTextDir.md)
875
-
876
867
  > - [`hrefLang` attribute](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
877
-
878
868
  > - [`lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
879
-
880
869
  > - [`dir` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
881
-
882
870
  > - [`aria-current` attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
883
871
 
884
872
  ### (Opcional) Paso 10: Crear un Componente de Enlace Localizado