@intlayer/docs 9.3.1 → 9.3.3
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/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/de/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/en/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/en-GB/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/es/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/fr/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/hi/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/id/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/it/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/ja/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/ko/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/pl/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/pt/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/ru/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/tr/nextjs-multilingual-seo-comparison.md +9 -9
- package/blog/uk/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/vi/nextjs-multilingual-seo-comparison.md +10 -10
- package/blog/zh/nextjs-multilingual-seo-comparison.md +10 -10
- package/dist/cjs/generated/docs.entry.cjs +20 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +20 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/bundle_optimization.md +1 -1
- package/docs/ar/configuration.md +32 -9
- package/docs/ar/dictionary/content_file.md +0 -22
- package/docs/ar/dictionary/function_fetching.md +23 -0
- package/docs/ar/eslint.md +336 -0
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/bn/configuration.md +34 -9
- package/docs/bn/eslint.md +336 -0
- package/docs/cs/bundle_optimization.md +1 -1
- package/docs/cs/configuration.md +33 -9
- package/docs/cs/eslint.md +336 -0
- package/docs/de/bundle_optimization.md +1 -1
- package/docs/de/configuration.md +34 -9
- package/docs/de/dictionary/content_file.md +0 -22
- package/docs/de/dictionary/function_fetching.md +23 -0
- package/docs/de/eslint.md +336 -0
- package/docs/en/bundle_optimization.md +1 -1
- package/docs/en/configuration.md +34 -9
- package/docs/en/dictionary/content_file.md +0 -22
- package/docs/en/dictionary/function_fetching.md +23 -0
- package/docs/en/eslint.md +336 -0
- package/docs/en/packages/intlayer/getLocalizedPath.md +70 -19
- package/docs/en-GB/configuration.md +33 -9
- package/docs/en-GB/dictionary/content_file.md +0 -22
- package/docs/en-GB/dictionary/function_fetching.md +23 -0
- package/docs/en-GB/eslint.md +336 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +32 -35
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/es/bundle_optimization.md +1 -1
- package/docs/es/configuration.md +35 -9
- package/docs/es/dictionary/content_file.md +0 -22
- package/docs/es/dictionary/function_fetching.md +23 -0
- package/docs/es/eslint.md +336 -0
- package/docs/fr/bundle_optimization.md +1 -1
- package/docs/fr/configuration.md +35 -9
- package/docs/fr/dictionary/content_file.md +0 -22
- package/docs/fr/dictionary/function_fetching.md +23 -0
- package/docs/fr/eslint.md +336 -0
- package/docs/hi/configuration.md +35 -9
- package/docs/hi/dictionary/content_file.md +0 -22
- package/docs/hi/dictionary/function_fetching.md +23 -0
- package/docs/hi/eslint.md +336 -0
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/hi/intlayer_with_vite+svelte.md +2 -2
- package/docs/id/configuration.md +35 -9
- package/docs/id/dictionary/content_file.md +0 -22
- package/docs/id/dictionary/function_fetching.md +23 -0
- package/docs/id/eslint.md +336 -0
- package/docs/it/bundle_optimization.md +1 -1
- package/docs/it/configuration.md +35 -9
- package/docs/it/dictionary/content_file.md +0 -22
- package/docs/it/dictionary/function_fetching.md +23 -0
- package/docs/it/eslint.md +336 -0
- package/docs/ja/configuration.md +30 -9
- package/docs/ja/dictionary/content_file.md +0 -22
- package/docs/ja/dictionary/function_fetching.md +23 -0
- package/docs/ja/eslint.md +336 -0
- package/docs/ja/intlayer_with_react_router_v7.md +1 -146
- package/docs/ja/intlayer_with_vite+react.md +5 -1
- package/docs/ko/configuration.md +31 -9
- package/docs/ko/dictionary/content_file.md +0 -22
- package/docs/ko/dictionary/function_fetching.md +23 -0
- package/docs/ko/eslint.md +336 -0
- package/docs/ko/intlayer_with_lynx+react.md +4 -0
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +1 -1
- package/docs/ko/intlayer_with_storybook.md +5 -5
- package/docs/nl/configuration.md +33 -9
- package/docs/nl/eslint.md +336 -0
- package/docs/pl/bundle_optimization.md +1 -1
- package/docs/pl/configuration.md +34 -9
- package/docs/pl/dictionary/content_file.md +0 -22
- package/docs/pl/dictionary/function_fetching.md +23 -0
- package/docs/pl/eslint.md +336 -0
- package/docs/pl/intlayer_with_astro.md +1 -114
- package/docs/pl/migration_from_i18next_to_intlayer.md +4 -0
- package/docs/pl/migration_from_next-i18next_to_intlayer.md +8 -4
- package/docs/pl/migration_from_next-intl_to_intlayer.md +11 -5
- package/docs/pl/migration_from_nuxtjs_i18n_to_intlayer.md +8 -4
- package/docs/pl/migration_from_react-i18next_to_intlayer.md +8 -4
- package/docs/pl/migration_from_vue-i18n_to_intlayer.md +4 -0
- package/docs/pt/bundle_optimization.md +1 -1
- package/docs/pt/configuration.md +34 -9
- package/docs/pt/dictionary/content_file.md +0 -22
- package/docs/pt/dictionary/function_fetching.md +23 -0
- package/docs/pt/eslint.md +336 -0
- package/docs/pt/intlayer_with_astro.md +1 -114
- package/docs/ru/bundle_optimization.md +1 -1
- package/docs/ru/configuration.md +34 -9
- package/docs/ru/dictionary/content_file.md +0 -22
- package/docs/ru/dictionary/function_fetching.md +23 -0
- package/docs/ru/eslint.md +336 -0
- package/docs/tr/bundle_optimization.md +1 -1
- package/docs/tr/configuration.md +33 -9
- package/docs/tr/dictionary/content_file.md +0 -22
- package/docs/tr/dictionary/function_fetching.md +23 -0
- package/docs/tr/eslint.md +336 -0
- package/docs/uk/configuration.md +35 -9
- package/docs/uk/dictionary/content_file.md +0 -22
- package/docs/uk/dictionary/function_fetching.md +23 -0
- package/docs/uk/eslint.md +336 -0
- package/docs/uk/packages/angular-intlayer/exports.md +2 -2
- package/docs/ur/configuration.md +35 -9
- package/docs/ur/eslint.md +336 -0
- package/docs/vi/bundle_optimization.md +1 -1
- package/docs/vi/configuration.md +33 -9
- package/docs/vi/dictionary/content_file.md +0 -22
- package/docs/vi/dictionary/function_fetching.md +23 -0
- package/docs/vi/eslint.md +336 -0
- package/docs/zh/bundle_optimization.md +1 -1
- package/docs/zh/configuration.md +29 -9
- package/docs/zh/dictionary/content_file.md +0 -22
- package/docs/zh/dictionary/function_fetching.md +23 -0
- package/docs/zh/eslint.md +336 -0
- package/docs/zh/intlayer_with_create_react_app.md +4 -0
- package/docs/zh/intlayer_with_lynx+react.md +4 -0
- package/docs/zh/intlayer_with_nextjs_14.md +0 -2
- package/docs/zh/intlayer_with_nextjs_15.md +0 -2
- package/docs/zh/intlayer_with_nextjs_page_router.md +0 -2
- package/docs/zh/intlayer_with_nuxt.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7.md +4 -0
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +4 -0
- package/docs/zh/intlayer_with_solid_start.md +1 -1
- package/docs/zh/intlayer_with_vite+vue.md +0 -2
- package/docs/zh-TW/bundle_optimization.md +1 -1
- package/docs/zh-TW/eslint.md +336 -0
- package/package.json +7 -7
- package/src/generated/docs.entry.ts +20 -0
|
@@ -63,12 +63,12 @@ author: aymericzip
|
|
|
63
63
|
|
|
64
64
|
غالبًا ما ينسى المطورون الإشارة بشكل صحيح إلى صفحاتهم عبر اللغات، لذا دعونا نرى كيف يعمل هذا عمليًا مع مكتبات مختلفة.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -156,10 +156,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
156
156
|
}
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
### **next-i18next**
|
|
160
|
-
|
|
161
159
|
</Tab>
|
|
162
|
-
<Tab label="next-i18next">
|
|
160
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
161
|
+
|
|
162
|
+
### **next-i18next**
|
|
163
163
|
|
|
164
164
|
```ts fileName="i18n.config.ts"
|
|
165
165
|
export const locales = ["en", "fr"] as const;
|
|
@@ -259,10 +259,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
259
259
|
}
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
### **إنتلاير**
|
|
263
|
-
|
|
264
262
|
</Tab>
|
|
265
|
-
<Tab label="intlayer">
|
|
263
|
+
<Tab label="intlayer" value="intlayer">
|
|
264
|
+
|
|
265
|
+
### **إنتلاير**
|
|
266
266
|
|
|
267
267
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
268
268
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,10 +63,10 @@ Dies sind einfache Schritte – aber das Überspringen kann Sie Sichtbarkeit kos
|
|
|
63
63
|
|
|
64
64
|
Entwickler vergessen oft, ihre Seiten über verschiedene Sprachversionen hinweg korrekt zu referenzieren. Schauen wir uns daher an, wie dies in der Praxis mit verschiedenen Bibliotheken funktioniert.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
71
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
@@ -154,10 +154,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
154
154
|
}
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
### **next-i18next**
|
|
158
|
-
|
|
159
157
|
</Tab>
|
|
160
|
-
<Tab label="next-i18next">
|
|
158
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
159
|
+
|
|
160
|
+
### **next-i18next**
|
|
161
161
|
|
|
162
162
|
```ts fileName="i18n.config.ts"
|
|
163
163
|
export const locales = ["en", "fr"] as const;
|
|
@@ -258,10 +258,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
258
258
|
}
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
### **Intlayer**
|
|
262
|
-
|
|
263
261
|
</Tab>
|
|
264
|
-
<Tab label="intlayer">
|
|
262
|
+
<Tab label="intlayer" value="intlayer">
|
|
263
|
+
|
|
264
|
+
### **Intlayer**
|
|
265
265
|
|
|
266
266
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
267
267
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ These are simple steps, but skipping them can cost you visibility.
|
|
|
63
63
|
|
|
64
64
|
Developers often forget to properly reference their pages across locales so let’s look at how this works in practice with different libraries.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ These are simple steps, but skipping them can cost you visibility.
|
|
|
63
63
|
|
|
64
64
|
Developers often forget to properly reference their pages across locales so let’s look at how this works in practice with different libraries.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ Estos son pasos simples, pero omitirlos puede costarte visibilidad.
|
|
|
63
63
|
|
|
64
64
|
Los desarrolladores a menudo olvidan referenciar correctamente sus páginas entre locales, así que veamos cómo funciona esto en la práctica con diferentes bibliotecas.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -155,10 +155,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
155
155
|
}
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
### **next-i18next**
|
|
159
|
-
|
|
160
158
|
</Tab>
|
|
161
|
-
<Tab label="next-i18next">
|
|
159
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
160
|
+
|
|
161
|
+
### **next-i18next**
|
|
162
162
|
|
|
163
163
|
```ts fileName="i18n.config.ts"
|
|
164
164
|
export const locales = ["en", "fr"] as const;
|
|
@@ -258,10 +258,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
258
258
|
}
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
### **Intlayer**
|
|
262
|
-
|
|
263
261
|
</Tab>
|
|
264
|
-
<Tab label="intlayer">
|
|
262
|
+
<Tab label="intlayer" value="intlayer">
|
|
263
|
+
|
|
264
|
+
### **Intlayer**
|
|
265
265
|
|
|
266
266
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
267
267
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ Ce sont des étapes simples, mais les ignorer peut vous coûter en visibilité.
|
|
|
63
63
|
|
|
64
64
|
Les développeurs oublient souvent de référencer correctement leurs pages selon les locales, voyons donc comment cela fonctionne en pratique avec différentes bibliothèques.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -155,10 +155,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
155
155
|
}
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
### **next-i18next**
|
|
159
|
-
|
|
160
158
|
</Tab>
|
|
161
|
-
<Tab label="next-i18next">
|
|
159
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
160
|
+
|
|
161
|
+
### **next-i18next**
|
|
162
162
|
|
|
163
163
|
```ts fileName="i18n.config.ts"
|
|
164
164
|
export const locales = ["en", "fr"] as const;
|
|
@@ -258,10 +258,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
258
258
|
}
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
### **Intlayer**
|
|
262
|
-
|
|
263
261
|
</Tab>
|
|
264
|
-
<Tab label="intlayer">
|
|
262
|
+
<Tab label="intlayer" value="intlayer">
|
|
263
|
+
|
|
264
|
+
### **Intlayer**
|
|
265
265
|
|
|
266
266
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
267
267
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ author: aymericzip
|
|
|
63
63
|
|
|
64
64
|
डेवलपर्स अक्सर अपने पृष्ठों को विभिन्न स्थानीय भाषाओं में सही ढंग से संदर्भित करना भूल जाते हैं, इसलिए आइए देखें कि यह विभिन्न लाइब्रेरीज़ के साथ व्यावहारिक रूप में कैसे काम करता है।
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -154,10 +154,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
154
154
|
}
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
### **next-i18next**
|
|
158
|
-
|
|
159
157
|
</Tab>
|
|
160
|
-
<Tab label="next-i18next">
|
|
158
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
159
|
+
|
|
160
|
+
### **next-i18next**
|
|
161
161
|
|
|
162
162
|
```ts fileName="i18n.config.ts"
|
|
163
163
|
export const locales = ["en", "fr"] as const;
|
|
@@ -257,10 +257,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
257
257
|
}
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
### **Intlayer**
|
|
261
|
-
|
|
262
260
|
</Tab>
|
|
263
|
-
<Tab label="intlayer">
|
|
261
|
+
<Tab label="intlayer" value="intlayer">
|
|
262
|
+
|
|
263
|
+
### **Intlayer**
|
|
264
264
|
|
|
265
265
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
266
266
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ Ini adalah langkah sederhana, tetapi melewatkannya dapat mengurangi visibilitas
|
|
|
63
63
|
|
|
64
64
|
Pengembang sering lupa untuk merujuk halaman mereka dengan benar di berbagai locale, jadi mari kita lihat bagaimana ini bekerja dalam praktik dengan berbagai pustaka.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ Questi sono passaggi semplici, ma saltarli può costarti visibilità.
|
|
|
63
63
|
|
|
64
64
|
Gli sviluppatori spesso dimenticano di riferire correttamente le loro pagine tra le diverse localizzazioni, quindi vediamo come funziona in pratica con diverse librerie.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -155,10 +155,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
155
155
|
}
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
### **next-i18next**
|
|
159
|
-
|
|
160
158
|
</Tab>
|
|
161
|
-
<Tab label="next-i18next">
|
|
159
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
160
|
+
|
|
161
|
+
### **next-i18next**
|
|
162
162
|
|
|
163
163
|
```ts fileName="i18n.config.ts"
|
|
164
164
|
export const locales = ["en", "fr"] as const;
|
|
@@ -258,10 +258,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
258
258
|
}
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
### **Intlayer**
|
|
262
|
-
|
|
263
261
|
</Tab>
|
|
264
|
-
<Tab label="intlayer">
|
|
262
|
+
<Tab label="intlayer" value="intlayer">
|
|
263
|
+
|
|
264
|
+
### **Intlayer**
|
|
265
265
|
|
|
266
266
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
267
267
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,10 +63,10 @@ author: aymericzip
|
|
|
63
63
|
|
|
64
64
|
開発者はしばしばロケール間でページを適切に参照することを忘れがちなので、さまざまなライブラリでどのように機能するかを見てみましょう。
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
71
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,10 +63,10 @@ author: aymericzip
|
|
|
63
63
|
|
|
64
64
|
개발자들은 종종 여러 로케일에 걸쳐 페이지를 올바르게 참조하는 것을 잊어버리므로, 다양한 라이브러리에서 이것이 실제로 어떻게 작동하는지 살펴보겠습니다.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
71
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,12 +63,12 @@ To proste kroki, ale ich pominięcie może kosztować Cię widoczność.
|
|
|
63
63
|
|
|
64
64
|
Programiści często zapominają o prawidłowym odwoływaniu się do swoich stron w różnych lokalizacjach, więc przyjrzyjmy się, jak to działa w praktyce z różnymi bibliotekami.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
|
-
```tsx fileName="src/app/[locale]/about/layout.tsx
|
|
71
|
+
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
73
73
|
import { locales, defaultLocale } from "@/i18n";
|
|
74
74
|
import { getTranslations, unstable_setRequestLocale } from "next-intl/server";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,10 +63,10 @@ Estes são passos simples, mas ignorá-los pode custar sua visibilidade.
|
|
|
63
63
|
|
|
64
64
|
Os desenvolvedores frequentemente esquecem de referenciar corretamente suas páginas entre os idiomas, então vamos ver como isso funciona na prática com diferentes bibliotecas.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
71
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
@@ -154,10 +154,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
154
154
|
}
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
### **next-i18next**
|
|
158
|
-
|
|
159
157
|
</Tab>
|
|
160
|
-
<Tab label="next-i18next">
|
|
158
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
159
|
+
|
|
160
|
+
### **next-i18next**
|
|
161
161
|
|
|
162
162
|
```ts fileName="i18n.config.ts"
|
|
163
163
|
export const locales = ["en", "fr"] as const;
|
|
@@ -257,10 +257,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
257
257
|
}
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
### **Intlayer**
|
|
261
|
-
|
|
262
260
|
</Tab>
|
|
263
|
-
<Tab label="intlayer">
|
|
261
|
+
<Tab label="intlayer" value="intlayer">
|
|
262
|
+
|
|
263
|
+
### **Intlayer**
|
|
264
264
|
|
|
265
265
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
266
266
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,10 +63,10 @@ author: aymericzip
|
|
|
63
63
|
|
|
64
64
|
Разработчики часто забывают правильно ссылаться на свои страницы в разных локалях, поэтому давайте посмотрим, как это работает на практике с различными библиотеками.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
71
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
@@ -161,10 +161,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
161
161
|
}
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
### **next-i18next**
|
|
165
|
-
|
|
166
164
|
</Tab>
|
|
167
|
-
<Tab label="next-i18next">
|
|
165
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
166
|
+
|
|
167
|
+
### **next-i18next**
|
|
168
168
|
|
|
169
169
|
```ts fileName="i18n.config.ts"
|
|
170
170
|
export const locales = ["en", "fr"] as const;
|
|
@@ -264,10 +264,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
264
264
|
}
|
|
265
265
|
```
|
|
266
266
|
|
|
267
|
-
### **Intlayer**
|
|
268
|
-
|
|
269
267
|
</Tab>
|
|
270
|
-
<Tab label="intlayer">
|
|
268
|
+
<Tab label="intlayer" value="intlayer">
|
|
269
|
+
|
|
270
|
+
### **Intlayer**
|
|
271
271
|
|
|
272
272
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
273
273
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|
|
@@ -63,10 +63,10 @@ Bunlar basit adımlar, ancak atlanmaları görünürlüğünüzü kaybetmenize n
|
|
|
63
63
|
|
|
64
64
|
Geliştiriciler genellikle sayfalarını farklı yereller arasında doğru şekilde referanslamayı unutur, bu yüzden bunun farklı kütüphanelerle pratikte nasıl çalıştığına bakalım.
|
|
65
65
|
|
|
66
|
-
### **next-intl**
|
|
67
|
-
|
|
68
66
|
<Tabs>
|
|
69
|
-
<Tab label="next-intl">
|
|
67
|
+
<Tab label="next-intl" value="next-intl">
|
|
68
|
+
|
|
69
|
+
### **next-intl**
|
|
70
70
|
|
|
71
71
|
```tsx fileName="src/app/[locale]/about/layout.tsx"
|
|
72
72
|
import type { Metadata } from "next";
|
|
@@ -153,10 +153,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### **next-i18next**
|
|
157
|
-
|
|
158
156
|
</Tab>
|
|
159
|
-
<Tab label="next-i18next">
|
|
157
|
+
<Tab label="next-i18next" value="next-i18next">
|
|
158
|
+
|
|
159
|
+
### **next-i18next**
|
|
160
160
|
|
|
161
161
|
```ts fileName="i18n.config.ts"
|
|
162
162
|
export const locales = ["en", "fr"] as const;
|
|
@@ -256,10 +256,10 @@ export default function robots(): MetadataRoute.Robots {
|
|
|
256
256
|
}
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
### **Intlayer**
|
|
260
|
-
|
|
261
259
|
</Tab>
|
|
262
|
-
<Tab label="intlayer">
|
|
260
|
+
<Tab label="intlayer" value="intlayer">
|
|
261
|
+
|
|
262
|
+
### **Intlayer**
|
|
263
263
|
|
|
264
264
|
````typescript fileName="src/app/[locale]/about/layout.tsx"
|
|
265
265
|
import { getIntlayer, getMultilingualUrls } from "intlayer";
|