@intlayer/docs 7.3.11 → 7.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/cjs/generated/docs.entry.cjs +19 -0
  2. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  3. package/dist/esm/generated/docs.entry.mjs +19 -0
  4. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  5. package/dist/types/generated/docs.entry.d.ts +1 -0
  6. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  7. package/docs/ar/intlayer_with_nuxt.md +305 -421
  8. package/docs/ar/intlayer_with_react_router_v7.md +33 -4
  9. package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +516 -0
  10. package/docs/ar/intlayer_with_tanstack.md +2 -12
  11. package/docs/ar/intlayer_with_vite+vue.md +1 -0
  12. package/docs/de/intlayer_with_nuxt.md +296 -394
  13. package/docs/de/intlayer_with_react_router_v7.md +33 -4
  14. package/docs/de/intlayer_with_react_router_v7_fs_routes.md +573 -0
  15. package/docs/de/intlayer_with_tanstack.md +1 -0
  16. package/docs/de/intlayer_with_vite+vue.md +1 -0
  17. package/docs/en/intlayer_with_nuxt.md +242 -321
  18. package/docs/en/intlayer_with_react_router_v7.md +24 -0
  19. package/docs/en/intlayer_with_react_router_v7_fs_routes.md +570 -0
  20. package/docs/en/intlayer_with_tanstack.md +2 -12
  21. package/docs/en/intlayer_with_vite+vue.md +49 -48
  22. package/docs/en-GB/intlayer_with_nuxt.md +262 -358
  23. package/docs/en-GB/intlayer_with_react_router_v7.md +33 -4
  24. package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +513 -0
  25. package/docs/en-GB/intlayer_with_tanstack.md +2 -12
  26. package/docs/en-GB/intlayer_with_vite+vue.md +1 -0
  27. package/docs/es/intlayer_with_nuxt.md +284 -375
  28. package/docs/es/intlayer_with_react_router_v7.md +33 -4
  29. package/docs/es/intlayer_with_react_router_v7_fs_routes.md +575 -0
  30. package/docs/es/intlayer_with_tanstack.md +1 -0
  31. package/docs/es/intlayer_with_vite+vue.md +1 -2
  32. package/docs/fr/intlayer_with_nuxt.md +288 -387
  33. package/docs/fr/intlayer_with_react_router_v7.md +34 -5
  34. package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +574 -0
  35. package/docs/fr/intlayer_with_tanstack.md +1 -0
  36. package/docs/fr/intlayer_with_vite+vue.md +1 -0
  37. package/docs/hi/intlayer_with_nuxt.md +318 -434
  38. package/docs/hi/intlayer_with_react_router_v7.md +33 -4
  39. package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +518 -0
  40. package/docs/hi/intlayer_with_tanstack.md +2 -12
  41. package/docs/hi/intlayer_with_vite+vue.md +1 -0
  42. package/docs/id/intlayer_with_nuxt.md +275 -376
  43. package/docs/id/intlayer_with_react_router_v7.md +29 -4
  44. package/docs/id/intlayer_with_react_router_v7_fs_routes.md +521 -0
  45. package/docs/id/intlayer_with_tanstack.md +2 -12
  46. package/docs/id/intlayer_with_vite+vue.md +1 -0
  47. package/docs/it/intlayer_with_nuxt.md +312 -408
  48. package/docs/it/intlayer_with_react_router_v7.md +33 -4
  49. package/docs/it/intlayer_with_react_router_v7_fs_routes.md +574 -0
  50. package/docs/it/intlayer_with_tanstack.md +1 -0
  51. package/docs/ja/intlayer_with_nuxt.md +319 -414
  52. package/docs/ja/intlayer_with_react_router_v7.md +33 -4
  53. package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +574 -0
  54. package/docs/ja/intlayer_with_tanstack.md +2 -12
  55. package/docs/ja/intlayer_with_vite+vue.md +1 -0
  56. package/docs/ko/intlayer_with_nuxt.md +307 -406
  57. package/docs/ko/intlayer_with_react_router_v7.md +33 -4
  58. package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +515 -0
  59. package/docs/ko/intlayer_with_tanstack.md +2 -12
  60. package/docs/ko/intlayer_with_vite+vue.md +1 -0
  61. package/docs/pl/intlayer_with_nuxt.md +282 -457
  62. package/docs/pl/intlayer_with_react_router_v7.md +32 -5
  63. package/docs/pl/intlayer_with_react_router_v7_fs_routes.md +615 -0
  64. package/docs/pl/intlayer_with_tanstack.md +2 -12
  65. package/docs/pl/intlayer_with_vite+vue.md +1 -0
  66. package/docs/pt/intlayer_with_nuxt.md +288 -403
  67. package/docs/pt/intlayer_with_react_router_v7.md +28 -0
  68. package/docs/pt/intlayer_with_tanstack.md +1 -0
  69. package/docs/ru/intlayer_with_nuxt.md +300 -410
  70. package/docs/ru/intlayer_with_react_router_v7.md +33 -4
  71. package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +574 -0
  72. package/docs/ru/intlayer_with_tanstack.md +1 -0
  73. package/docs/ru/intlayer_with_vite+vue.md +1 -0
  74. package/docs/tr/intlayer_with_nuxt.md +327 -392
  75. package/docs/tr/intlayer_with_react_router_v7.md +33 -4
  76. package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +572 -0
  77. package/docs/tr/intlayer_with_tanstack.md +2 -12
  78. package/docs/tr/intlayer_with_vite+vue.md +1 -0
  79. package/docs/vi/intlayer_with_nuxt.md +282 -399
  80. package/docs/vi/intlayer_with_react_router_v7.md +29 -4
  81. package/docs/vi/intlayer_with_react_router_v7_fs_routes.md +523 -0
  82. package/docs/vi/intlayer_with_tanstack.md +2 -12
  83. package/docs/vi/intlayer_with_vite+vue.md +1 -0
  84. package/docs/zh/intlayer_with_nuxt.md +311 -444
  85. package/docs/zh/intlayer_with_react_router_v7.md +33 -4
  86. package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +516 -0
  87. package/docs/zh/intlayer_with_tanstack.md +2 -12
  88. package/docs/zh/intlayer_with_vite+vue.md +1 -0
  89. package/package.json +6 -6
  90. package/src/generated/docs.entry.ts +19 -0
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  createdAt: 2025-06-18
3
- updatedAt: 2025-06-29
4
- title: Nuxt and Vueアプリを翻訳する方法 – i18nガイド 2025
3
+ updatedAt: 2025-12-07
4
+ title: Nuxt Vue アプリを翻訳する方法 – i18n ガイド 2025
5
5
  description: Nuxt と Vue のウェブサイトを多言語対応にする方法を紹介します。国際化(i18n)と翻訳のためのドキュメントに従ってください。
6
6
  keywords:
7
7
  - 国際化
@@ -14,35 +14,70 @@ slugs:
14
14
  - doc
15
15
  - environment
16
16
  - nuxt-and-vue
17
- applicationTemplate: https://github.com/aymericzip/intlayer-nuxt-template
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-nuxt-4-template
18
+ youtubeVideo: https://www.youtube.com/watch?v=IE3XWkZ6a5U
18
19
  history:
20
+ - version: 7.3.11
21
+ date: 2025-12-07
22
+ changes: LocaleSwitcher、SEO、メタデータの更新
19
23
  - version: 5.5.10
20
24
  date: 2025-06-29
21
25
  changes: 履歴の初期化
22
26
  ---
23
27
 
24
- # IntlayerNuxt and Vueを翻訳する | 国際化(i18n)
28
+ # Intlayer を使って Nuxt Vue のウェブサイトを翻訳する | 国際化(i18n)
25
29
 
26
- GitHub の [アプリケーションテンプレート](https://github.com/aymericzip/intlayer-nuxt-template) を参照してください。
30
+ ## 目次
27
31
 
28
- ## Intlayer とは?
32
+ <TOC/>
33
+
34
+ ## Intlayerとは?
29
35
 
30
36
  **Intlayer** は、最新のウェブアプリケーションにおける多言語対応を簡素化するために設計された革新的なオープンソースの国際化(i18n)ライブラリです。
31
37
 
32
- Intlayer を使うことで、以下が可能になります:
38
+ Intlayerを使うことで、以下が可能になります:
33
39
 
34
40
  - **コンポーネントレベルで宣言的な辞書を使い、翻訳を簡単に管理**できます。
35
41
  - **メタデータ、ルート、コンテンツを動的にローカライズ**できます。
36
- - **自動生成された型により TypeScript サポートを確保し、オートコンプリートやエラー検出を向上**させます。
37
- - **動的なロケール検出や切り替えなどの高度な機能**を活用できます。
42
+ - **自動生成された型によりTypeScriptサポートを確保し、オートコンプリートやエラー検出を向上**させます。
43
+ - **動的なロケール検出や切り替えなどの高度な機能**を利用できます。
38
44
 
39
45
  ---
40
46
 
41
- ## Nuxt アプリケーションで Intlayer をセットアップするステップバイステップガイド
47
+ ## NuxtアプリケーションでIntlayerをセットアップするステップバイステップガイド
48
+
49
+ <iframe
50
+ src="https://stackblitz.com/github/aymericzip/intlayer-nuxt-4-template?embed=1&ctl=1&file=intlayer.config.ts"
51
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
52
+ title="デモ CodeSandbox - Intlayerを使ってアプリケーションを国際化する方法"
53
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
54
+ loading="lazy"
55
+ />
56
+
57
+ ### ステップ1: 依存関係のインストール
58
+
59
+ <Tab defaultTab="video">
60
+ <TabItem label="ビデオ" value="video">
61
+
62
+ <iframe title="NuxtとVueアプリをIntlayerで翻訳する方法?Intlayerを発見しよう" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/IE3XWkZ6a5U?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
63
+
64
+ </TabItem>
65
+ <TabItem label="コード" value="code">
66
+
67
+ <iframe
68
+ src="https://stackblitz.com/github/aymericzip/intlayer-nuxt-4-template?embed=1&ctl=1&file=intlayer.config.ts"
69
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
70
+ title="デモ CodeSandbox - Intlayerを使ってアプリケーションを国際化する方法"
71
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
72
+ loading="lazy"
73
+ />
74
+
75
+ </TabItem>
76
+ </Tab>
42
77
 
43
- ### ステップ 1: 依存パッケージのインストール
78
+ GitHubの[アプリケーションテンプレート](https://github.com/aymericzip/intlayer-nuxt-4-template)を参照してください。
44
79
 
45
- npm を使って必要なパッケージをインストールします:
80
+ npmを使って必要なパッケージをインストールします:
46
81
 
47
82
  ```bash packageManager="npm"
48
83
  npm install intlayer vue-intlayer
@@ -61,17 +96,17 @@ yarn add --save-dev nuxt-intlayer
61
96
 
62
97
  - **intlayer**
63
98
 
64
- 設定管理、翻訳、[コンテンツ宣言](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/dictionary/get_started.md)、トランスパイル、および[CLIコマンド](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_cli.md)のための国際化ツールを提供するコアパッケージです。
99
+ 設定管理、翻訳、[コンテンツ宣言](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/dictionary/content_file.md)、トランスパイル、および[CLIコマンド](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/index.md)のための国際化ツールを提供するコアパッケージです。
65
100
 
66
101
  - **vue-intlayer**
67
- IntlayerをVueアプリケーションに統合するパッケージです。Vueコンポーネント用のコンポーザブルを提供します。
102
+ IntlayerをVueアプリケーションに統合するパッケージです。Vueコンポーネント用のcomposablesを提供します。
68
103
 
69
104
  - **nuxt-intlayer**
70
- NuxtアプリケーションにIntlayerを統合するNuxtモジュールです。自動セットアップ、ロケール検出のためのミドルウェア、クッキー管理、URLリダイレクションを提供します。
105
+ NuxtアプリケーションとIntlayerを統合するNuxtモジュールです。自動セットアップ、ロケール検出のためのミドルウェア、クッキー管理、URLリダイレクトを提供します。
71
106
 
72
107
  ### ステップ2: プロジェクトの設定
73
108
 
74
- アプリケーションの言語を設定するための設定ファイルを作成します:
109
+ アプリケーションの言語を設定するための設定ファイルを作成します。
75
110
 
76
111
  ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
77
112
  import { Locales, type IntlayerConfig } from "intlayer";
@@ -82,13 +117,10 @@ const config: IntlayerConfig = {
82
117
  Locales.ENGLISH,
83
118
  Locales.FRENCH,
84
119
  Locales.SPANISH,
85
- // 他のロケールを追加
120
+ // 他のロケールをここに追加
86
121
  ],
87
122
  defaultLocale: Locales.ENGLISH,
88
123
  },
89
- content: {
90
- contentDir: ["."], // デフォルトではIntlayerは`./src`ディレクトリのコンテンツ宣言ファイルを監視します
91
- },
92
124
  };
93
125
 
94
126
  export default config;
@@ -108,9 +140,6 @@ const config = {
108
140
  ],
109
141
  defaultLocale: Locales.ENGLISH,
110
142
  },
111
- content: {
112
- contentDir: ["."],
113
- },
114
143
  };
115
144
 
116
145
  export default config;
@@ -130,19 +159,16 @@ const config = {
130
159
  ],
131
160
  defaultLocale: Locales.ENGLISH,
132
161
  },
133
- content: {
134
- contentDir: ["."],
135
- },
136
162
  };
137
163
 
138
164
  module.exports = config;
139
165
  ```
140
166
 
141
- > この設定ファイルを通じて、ローカライズされたURL、ミドルウェアのリダイレクション、クッキー名、コンテンツ宣言の場所と拡張子、コンソールでのIntlayerログの無効化などを設定できます。利用可能なパラメータの完全なリストについては、[設定ドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/configuration.md)を参照してください。
167
+ > この設定ファイルを通じて、ローカライズされたURL、ミドルウェアのリダイレクション、クッキー名、コンテンツ宣言の場所と拡張子、Intlayerのコンソールログの無効化などを設定できます。利用可能なパラメータの完全なリストについては、[設定ドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/configuration.md)を参照してください。
142
168
 
143
169
  ### ステップ3: Nuxt設定にIntlayerを統合する
144
170
 
145
- Nuxtの設定にintlayerモジュールを追加します:
171
+ Nuxtの設定にintlayerモジュールを追加します:
146
172
 
147
173
  ```typescript fileName="nuxt.config.ts"
148
174
  import { defineNuxtConfig } from "nuxt/config";
@@ -153,229 +179,46 @@ export default defineNuxtConfig({
153
179
  });
154
180
  ```
155
181
 
156
- > `nuxt-intlayer` モジュールは、Intlayer と Nuxt の統合を自動的に処理します。コンテンツ宣言の構築を設定し、開発モードでファイルを監視し、ロケール検出のためのミドルウェアを提供し、ローカライズされたルーティングを管理します。
182
+ > `nuxt-intlayer` モジュールは、Intlayer と Nuxt の統合を自動的に処理します。コンテンツ宣言のビルドを設定し、開発モードでファイルを監視し、ロケール検出のためのミドルウェアを提供し、ローカライズされたルーティングを管理します。
157
183
 
158
184
  ### ステップ 4: コンテンツを宣言する
159
185
 
160
186
  翻訳を格納するためのコンテンツ宣言を作成および管理します:
161
187
 
162
- ```tsx fileName="components/helloWorld.content.ts" contentDeclarationFormat="typescript"
163
- import { t, type Dictionary } from "intlayer";
188
+ ```tsx fileName="content/home-page.content.ts" contentDeclarationFormat="typescript"
189
+ import { type Dictionary, t } from "intlayer";
164
190
 
165
- const helloWorldContent = {
166
- key: "helloworld",
191
+ const content = {
192
+ key: "home-page",
167
193
  content: {
168
- count: t({ en: "count is ", fr: "le compte est ", es: "el recuento es " }),
169
- edit: t({
170
- en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
171
- fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
172
- es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
173
- }),
174
- checkOut: t({ en: "Check out ", fr: "Vérifiez ", es: "Compruebe " }),
175
- nuxtIntlayer: t({
176
- en: "Nuxt Intlayer documentation",
177
- fr: "Documentation de Nuxt Intlayer",
178
- es: "Documentación de Nuxt Intlayer",
179
- }),
180
- learnMore: t({
181
- en: "Learn more about Nuxt in the ",
182
- fr: "En savoir plus sur Nuxt dans la ",
183
- es: "Aprenda más sobre Nuxt en la ",
184
- }),
185
- nuxtDocs: t({
186
- en: "Nuxt Documentation",
187
- fr: "Documentation Nuxt",
188
- es: "Documentación de Nuxt",
194
+ title: t({
195
+ en: "Hello world",
196
+ fr: "Bonjour le monde",
197
+ es: "Hola mundo",
189
198
  }),
190
- readTheDocs: t({
191
- en: "Click on the Nuxt logo to learn more",
192
- ja: "詳細を知るにはNuxtのロゴをクリックしてください",
193
- fr: "Cliquez sur le logo Nuxt pour en savoir plus",
194
- es: "Haga clic en el logotipo de Nuxt para obtener más información",
199
+ metaTitle: t({
200
+ en: "Welcome | My Application",
201
+ fr: "Bienvenue | Mon Application",
202
+ es: "Bienvenido | Mi Aplicación",
195
203
  }),
196
- },
197
- } satisfies Dictionary;
198
-
199
- export default helloWorldContent;
200
- fr: "Cliquez sur le logo Nuxt pour en savoir plus",
201
- es: "Haga clic en el logotipo de Nuxt para obtener más información",
204
+ metaDescription: t({
205
+ en: "Discover your multilingual Nuxt app homepage powered by Intlayer.",
206
+ fr: "Découvrez la page d'accueil multilingue de votre application Nuxt propulsée par Intlayer.",
207
+ es: "Descubre la página de inicio multilingüe de tu aplicación Nuxt impulsada por Intlayer.",
202
208
  }),
203
209
  },
204
210
  } satisfies Dictionary;
205
211
 
206
- export default helloWorldContent;
207
- ```
208
-
209
- ```javascript fileName="components/helloWorld.content.mjs" contentDeclarationFormat="esm"
210
- import { t } from "intlayer";
211
-
212
- /** @type {import('intlayer').Dictionary} */
213
- const helloWorldContent = {
214
- key: "helloworld",
215
- content: {
216
- count: t({
217
- en: "count is ",
218
- ja: "カウントは ",
219
- fr: "le compte est ",
220
- es: "el recuento es ",
221
- }),
222
- edit: t({
223
- en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
224
- ja: "<code>components/HelloWorld.vue</code> を編集して保存し、HMRをテストしてください",
225
- fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
226
- es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
227
- }),
228
- checkOut: t({
229
- ja: "チェックしてください ",
230
- en: "Check out ",
231
- fr: "Vérifiez ",
232
- es: "Compruebe ",
233
- }),
234
- nuxtIntlayer: t({
235
- ja: "Nuxt Intlayer ドキュメント",
236
- en: "Nuxt Intlayer documentation",
237
- fr: "Documentation de Nuxt Intlayer",
238
- es: "Documentación de Nuxt Intlayer",
239
- }),
240
- learnMore: t({
241
- ja: "Nuxt について詳しくは ",
242
- en: "Learn more about Nuxt in the ",
243
- fr: "En savoir plus sur Nuxt dans la ",
244
- es: "Aprenda más sobre Nuxt en la ",
245
- }),
246
- nuxtDocs: t({
247
- ja: "Nuxt ドキュメント",
248
- en: "Nuxt Documentation",
249
- fr: "Documentation Nuxt",
250
- es: "Documentación de Nuxt",
251
- }),
252
- readTheDocs: t({
253
- ja: "Nuxt ロゴをクリックして詳細を確認してください",
254
- en: "Click on the Nuxt logo to learn more",
255
- fr: "Cliquez sur le logo Nuxt pour en savoir plus",
256
- es: "Haga clic en el logotipo de Nuxt para obtener más información",
257
- }),
258
- },
259
- };
260
-
261
- export default helloWorldContent;
212
+ export default content;
262
213
  ```
263
214
 
264
- ```javascript fileName="components/helloWorld.content.cjs" contentDeclarationFormat="commonjs"
265
- const { t } = require("intlayer");
215
+ > コンテンツ宣言は、`contentDir` ディレクトリ(デフォルトは `./src`)に含まれている限り、アプリケーションのどこにでも定義できます。また、コンテンツ宣言ファイルの拡張子(デフォルトは `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)に一致している必要があります。
266
216
 
267
- /** @type {import('intlayer').Dictionary} */
268
- const helloWorldContent = {
269
- key: "helloworld",
270
- content: {
271
- count: t({ ja: "カウントは ", en: "count is ", fr: "le compte est ", es: "el recuento es " }),
272
- edit: t({
273
- ja: "<code>components/HelloWorld.vue</code> を編集して保存し、HMRをテストしてください",
274
- en: "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
275
- fr: "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
276
- es: "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
277
- }),
278
- checkOut: t({ ja: "チェックしてください ", en: "Check out ", fr: "Vérifiez ", es: "Compruebe " }),
279
- nuxtIntlayer: t({
280
- ja: "Nuxt Intlayer ドキュメント",
281
- en: "Nuxt Intlayer documentation",
282
- fr: "Documentation de Nuxt Intlayer",
283
- es: "Documentación de Nuxt Intlayer",
284
- }),
285
- es: "Nuxt Intlayerのドキュメント",
286
- }),
287
- learnMore: t({
288
- en: "Learn more about Nuxt in the ",
289
- fr: "En savoir plus sur Nuxt dans la ",
290
- es: "Aprenda más sobre Nuxt en la ",
291
- ja: "Nuxtについて詳しくは、",
292
- }),
293
- nuxtDocs: t({
294
- en: "Nuxt Documentation",
295
- fr: "Documentation Nuxt",
296
- es: "Documentación de Nuxt",
297
- ja: "Nuxtドキュメント",
298
- }),
299
- readTheDocs: t({
300
- en: "Click on the Nuxt logo to learn more",
301
- fr: "Cliquez sur le logo Nuxt pour en savoir plus",
302
- es: "Haga clic en el logotipo de Nuxt para obtener más información",
303
- ja: "Nuxtのロゴをクリックして詳細を確認してください",
304
- }),
305
- },
306
- };
307
-
308
- module.exports = helloWorldContent;
309
- ```
310
-
311
- ```json fileName="components/helloWorld.content.json" contentDeclarationFormat="json"
312
- {
313
- "$schema": "https://intlayer.org/schema.json",
314
- "key": "helloworld",
315
- "content": {
316
- "count": {
317
- "nodeType": "translation",
318
- "translation": {
319
- "en": "count is ",
320
- "fr": "le compte est ",
321
- "es": "el recuento es ",
322
- "ja": "カウントは "
323
- }
324
- },
325
- "edit": {
326
- "nodeType": "translation",
327
- "translation": {
328
- "en": "Edit <code>components/HelloWorld.vue</code> and save to test HMR",
329
- "fr": "Éditez <code>components/HelloWorld.vue</code> et enregistrez pour tester HMR",
330
- "es": "Edita <code>components/HelloWorld.vue</code> y guarda para probar HMR",
331
- "ja": "<code>components/HelloWorld.vue</code> を編集して保存し、HMRをテストしてください"
332
- }
333
- },
334
- "checkOut": {
335
- "nodeType": "translation",
336
- "translation": {
337
- "en": "Check out ",
338
- "fr": "Vérifiez ",
339
- "es": "Compruebe ",
340
- "ja": "チェックしてください "
341
- }
342
- },
343
- "nuxtIntlayer": {
344
- "nodeType": "translation",
345
- "translation": {
346
- "ja": "Nuxt Intlayer ドキュメント"
347
- }
348
- },
349
- "learnMore": {
350
- "nodeType": "translation",
351
- "translation": {
352
- "ja": "Nuxt について詳しくは "
353
- }
354
- },
355
- "nuxtDocs": {
356
- "nodeType": "translation",
357
- "translation": {
358
- "ja": "Nuxt ドキュメント"
359
- }
360
- },
361
- "readTheDocs": {
362
- "nodeType": "translation",
363
- "translation": {
364
- "ja": "Nuxt ロゴをクリックして詳細を確認してください"
365
- "es": "Haga clic en el logotipo de Nuxt para obtener más información"
366
- }
367
- }
368
- }
369
- }
370
- ```
371
-
372
- > あなたのコンテンツ宣言は、`contentDir` ディレクトリ(デフォルトは `./src`)内に含まれている限り、アプリケーションのどこにでも定義できます。また、コンテンツ宣言ファイルの拡張子(デフォルトは `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`)に一致している必要があります。
373
-
374
- > 詳細については、[コンテンツ宣言のドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/dictionary/get_started.md)を参照してください。
217
+ > 詳細については、[コンテンツ宣言ドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/dictionary/content_file.md)を参照してください。
375
218
 
376
219
  ### ステップ5: コード内でIntlayerを利用する
377
220
 
378
- `useIntlayer` コンポーザブルを使って、Nuxtアプリケーション全体でコンテンツ辞書にアクセスします:
221
+ `useIntlayer`コンポーザブルを使って、Nuxtアプリケーション全体でコンテンツ辞書にアクセスします:
379
222
 
380
223
  ```vue fileName="components/HelloWorld.vue"
381
224
  <script setup lang="ts">
@@ -413,97 +256,87 @@ const countRef = ref(0);
413
256
  <checkOut />
414
257
  <a href="https://nuxt.com/docs/getting-started/introduction" target="_blank"
415
258
  >Nuxt</a
416
- >, <nuxtIntlayer />
259
+ >、<nuxtIntlayer />
417
260
  </p>
418
261
  <p>
419
262
  <learnMore />
420
- <a href="https://nuxt.com" target="_blank"><nuxtDocs /></a>.
263
+ <a href="https://nuxt.com" target="_blank"><nuxtDocs /></a>。
421
264
  </p>
422
265
  <p class="read-the-docs"><readTheDocs /></p>
423
266
  <p class="read-the-docs">{{ readTheDocs }}</p>
424
267
  </template>
425
268
  ```
426
269
 
427
- #### Intlayerでのコンテンツへのアクセス
270
+ #### Intlayerでのコンテンツアクセス
428
271
 
429
- Intlayerは、コンテンツにアクセスするためのさまざまなAPIを提供しています。
272
+ IntlayerはコンテンツにアクセスするためのさまざまなAPIを提供しています:
430
273
 
431
274
  - **コンポーネントベースの構文**(推奨):
432
- `<myContent />` または `<Component :is="myContent" />` の構文を使用して、Intlayerノードとしてコンテンツをレンダリングします。これは[ビジュアルエディター](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_visual_editor.md)[CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_CMS.md)とシームレスに統合されます。
275
+ `<myContent />` または `<Component :is="myContent" />` の構文を使用して、コンテンツを Intlayer ノードとしてレンダリングします。これは [Visual Editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_visual_editor.md) および [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_CMS.md) とシームレスに統合されます。
433
276
 
434
- - **文字列ベースの構文**:
435
- `{{ myContent }}` を使用して、ビジュアルエディターのサポートなしにプレーンテキストとしてコンテンツをレンダリングします。
277
+ - **文字列ベースの構文**:
278
+ `{{ myContent }}` を使用して、Visual Editor のサポートなしにプレーンテキストとしてコンテンツをレンダリングします。
436
279
 
437
- - **生のHTML構文**:
438
- `<div v-html="myContent" />` を使用して、ビジュアルエディターのサポートなしに生のHTMLとしてコンテンツをレンダリングします。
280
+ - **生の HTML 構文**:
281
+ `<div v-html="myContent" />` を使用して、Visual Editor のサポートなしに生の HTML としてコンテンツをレンダリングします。
439
282
 
440
- - **分割代入構文**:
441
- `useIntlayer` コンポーザブルは、コンテンツを含む Proxy を返します。この Proxy はリアクティビティを維持しながらコンテンツにアクセスするために分割代入(デストラクチャリング)できます。
442
- - `const content = useIntlayer("myContent");` を使い、`{{ content.myContent }}` または `<content.myContent />` として使用します。
443
- - または `const { myContent } = useIntlayer("myContent");` を使い、`{{ myContent }}` または `<myContent/>` として分割代入して使用します。
283
+ - **分割代入構文**:
284
+ `useIntlayer` コンポーザブルはコンテンツを含む Proxy を返します。この Proxy はリアクティビティを保ちながらコンテンツにアクセスするために分割代入可能です。
285
+ - `const content = useIntlayer("myContent");` を使用し、`{{ content.myContent }}` / `<content.myContent />` としてレンダリングします。
286
+ - または、`const { myContent } = useIntlayer("myContent");` を使用してコンテンツを分割代入し、`{{ myContent }}` / `<myContent/>` としてレンダリングします。
444
287
 
445
288
  ### (オプション)ステップ6: コンテンツの言語を変更する
446
289
 
447
- コンテンツの言語を変更するには、`useLocale` コンポーザブルが提供する `setLocale` 関数を使用します。この関数を使うことで、アプリケーションのロケールを設定し、それに応じてコンテンツを更新できます。
290
+ コンテンツの言語を変更するには、`useLocale` コンポーザブルが提供する `setLocale` 関数を使用します。この関数により、アプリケーションのロケールを設定し、それに応じてコンテンツを更新できます。
448
291
 
449
- 言語を切り替えるコンポーネントを作成します:
292
+ `NuxtLink` を使用して言語を切り替えるコンポーネントを作成します。**ロケール切り替えにボタンではなくリンクを使うことは、SEOやページの発見性向上のベストプラクティスです**。これにより、検索エンジンがすべてのローカライズされたページをクロールしインデックス化できます。
450
293
 
451
294
  ```vue fileName="components/LocaleSwitcher.vue"
452
- <template>
453
- <div class="locale-switcher">
454
- <select v-model="selectedLocale" @change="changeLocale">
455
- <option v-for="loc in availableLocales" :key="loc" :value="loc">
456
- {{ getLocaleName(loc) }}
457
- </option>
458
- </select>
459
- </div>
460
- </template>
461
-
462
295
  <script setup lang="ts">
463
- import { ref, watch } from "vue";
464
- import { getLocaleName } from "intlayer";
296
+ import { getLocaleName, getLocalizedUrl } from "intlayer";
465
297
  import { useLocale } from "vue-intlayer";
466
298
 
467
- // ロケール情報と setLocale 関数を取得
299
+ // NuxtはuseRouteを自動インポートします
300
+ const route = useRoute();
468
301
  const { locale, availableLocales, setLocale } = useLocale();
469
-
470
- // ref で選択されたロケールを追跡
471
- const selectedLocale = ref(locale.value);
472
-
473
- // 選択が変更されたときにロケールを更新
474
- const changeLocale = () => setLocale(selectedLocale.value);
475
-
476
- // selectedLocale をグローバルロケールと同期させる
477
- watch(
478
- () => locale.value,
479
- (newLocale) => {
480
- selectedLocale.value = newLocale;
481
- }
482
- );
483
302
  </script>
303
+
304
+ <template>
305
+ <nav class="locale-switcher">
306
+ <NuxtLink
307
+ v-for="localeEl in availableLocales"
308
+ :key="localeEl"
309
+ :to="getLocalizedUrl(route.fullPath, localeEl)"
310
+ class="locale-link"
311
+ :class="{ 'active-locale': localeEl === locale }"
312
+ @click="setLocale(localeEl)"
313
+ >
314
+ {{ getLocaleName(localeEl) }}
315
+ </NuxtLink>
316
+ </nav>
484
317
  </template>
318
+ ```
485
319
 
486
- <style scoped>
487
- .locale-switcher {
488
- margin: 1rem 0;
489
- }
320
+ > `NuxtLink` を適切な `href` 属性(`getLocalizedUrl` 経由)と共に使用することで、検索エンジンがページのすべての言語バリアントを検出できるようになります。これは、検索エンジンクローラーが追跡しない可能性のあるJavaScriptのみのロケール切り替えよりも望ましい方法です。
490
321
 
491
- select {
492
- padding: 0.5rem;
493
- border-radius: 0.25rem;
494
- border: 1px solid #ccc;
495
- }
496
- </style>
322
+ 次に、`app.vue` を設定してレイアウトを使用します:
323
+
324
+ ```vue fileName="app.vue"
325
+ <template>
326
+ <NuxtLayout>
327
+ <NuxtPage />
328
+ </NuxtLayout>
329
+ </template>
497
330
  ```
498
331
 
499
- 次に、このコンポーネントをページやレイアウトで使用します:
332
+ ### (オプション)ステップ6b:ナビゲーション付きレイアウトの作成
500
333
 
501
- ```vue fileName="app.vue"
334
+ Nuxtのレイアウトを使うと、ページの共通構造を定義できます。ロケールスイッチャーとナビゲーションを含むデフォルトレイアウトを作成しましょう:
335
+
336
+ ```vue fileName="layouts/default.vue"
502
337
  <script setup lang="ts">
503
- import { useIntlayer } from "vue-intlayer";
338
+ import Links from "~/components/Links.vue";
504
339
  import LocaleSwitcher from "~/components/LocaleSwitcher.vue";
505
-
506
- const content = useIntlayer("app"); // 関連するintlayer宣言ファイルを作成
507
340
  </script>
508
341
 
509
342
  <template>
@@ -512,17 +345,22 @@ const content = useIntlayer("app"); // 関連するintlayer宣言ファイルを
512
345
  <LocaleSwitcher />
513
346
  </header>
514
347
  <main>
515
- <NuxtPage />
348
+ <slot />
516
349
  </main>
350
+
351
+ <Links href="/">ホーム</Links>
352
+ <Links href="/about">アバウト</Links>
517
353
  </div>
518
354
  </template>
519
355
  ```
520
356
 
521
- ### (オプション)ステップ7:アプリケーションにローカライズされたルーティングを追加する
357
+ `Links` コンポーネント(以下に示す)は、内部ナビゲーションリンクが自動的にローカライズされることを保証します。
522
358
 
523
- Nuxtは、`nuxt-intlayer`モジュールを使用すると、自動的にローカライズされたルーティングを処理します。これにより、ページディレクトリ構造に基づいて各言語のルートが自動的に作成されます。
359
+ ### (オプション)ステップ7: アプリケーションにローカライズされたルーティングを追加する
524
360
 
525
- 例:
361
+ `nuxt-intlayer` モジュールを使用すると、Nuxtはローカライズされたルーティングを自動的に処理します。これは、ページのディレクトリ構造に基づいて各言語のルートを自動的に作成します。
362
+
363
+ 例:
526
364
 
527
365
  ```plaintext
528
366
  pages/
@@ -532,217 +370,286 @@ pages/
532
370
  └── index.vue → /contact, /fr/contact, /es/contact
533
371
  ```
534
372
 
535
- ローカライズされたページを作成するには、単に`pages/`ディレクトリにVueファイルを作成します:
373
+ ローカライズされたページを作成するには、単に `pages/` ディレクトリに Vue ファイルを作成します。以下に2つの例を示します。
536
374
 
537
- ```vue fileName="pages/about.vue"
375
+ **ホームページ (`pages/index.vue`):**
376
+
377
+ ```vue fileName="pages/index.vue"
538
378
  <script setup lang="ts">
539
379
  import { useIntlayer } from "vue-intlayer";
540
380
 
541
- const content = useIntlayer("about");
381
+ const content = useIntlayer("home-page");
382
+
383
+ useHead({
384
+ title: content.metaTitle.value,
385
+ meta: [
386
+ {
387
+ name: "description",
388
+ content: content.metaDescription.value,
389
+ },
390
+ ],
391
+ });
542
392
  </script>
543
393
 
544
394
  <template>
545
- <div>
546
- <h1>{{ content.title }}</h1>
547
- <p>{{ content.description }}</p>
548
- </div>
395
+ <h1><content.title /></h1>
549
396
  </template>
550
397
  ```
551
398
 
552
- `nuxt-intlayer`モジュールは自動的に以下を行います:
399
+ **アバウトページ (`pages/about.vue`):**
553
400
 
554
- - ユーザーの優先ロケールを検出する
555
- - URLを介したロケール切り替えを処理する
556
- - 適切な `<html lang="">` 属性を設定する
557
- - ロケールクッキーを管理する
558
- - ユーザーを適切なローカライズされたURLにリダイレクトする
401
+ ```vue fileName="pages/about.vue"
402
+ <script setup lang="ts">
403
+ import { useIntlayer } from "vue-intlayer";
559
404
 
560
- ### (オプション)ステップ8:ローカライズされたリンクコンポーネントの作成
405
+ const content = useIntlayer("about-page");
561
406
 
562
- アプリケーションのナビゲーションが現在のロケールを尊重するようにするために、カスタムの `LocalizedLink` コンポーネントを作成できます。このコンポーネントは内部URLに自動的に現在の言語をプレフィックスとして付加します。
407
+ useHead({
408
+ title: content.metaTitle.raw, // プリミティブ文字列アクセスには .raw を使用
409
+ meta: [
410
+ {
411
+ name: "description",
412
+ content: content.metaDescription.raw, // プリミティブな文字列アクセスには .raw を使用
413
+ },
414
+ ],
415
+ });
416
+ </script>
563
417
 
564
- ```vue fileName="components/LocalizedLink.vue"
565
418
  <template>
566
- <NuxtLink :to="localizedHref" v-bind="$attrs">
567
- <slot />
568
- </NuxtLink>
419
+ <h1><content.title /></h1>
569
420
  </template>
421
+ ```
422
+
423
+ > 注意: `useHead` は Nuxt で自動インポートされます。コンテンツの値には `.value`(リアクティブ)または `.raw`(プリミティブ文字列)を用途に応じて使用できます。
424
+
425
+ `nuxt-intlayer` モジュールは自動的に以下を行います:
426
+
427
+ - ユーザーの優先ロケールを検出
428
+ - URL を介したロケール切り替えの処理
429
+ - 適切な `<html lang="">` 属性の設定
430
+ - ロケールクッキーの管理
431
+ - ユーザーを適切なローカライズされた URL にリダイレクト
432
+
433
+ ### (オプション)ステップ8:ローカライズされたリンクコンポーネントの作成
434
+
435
+ アプリケーションのナビゲーションが現在のロケールを尊重するようにするために、カスタムの `Links` コンポーネントを作成できます。このコンポーネントは内部URLに自動的に現在の言語をプレフィックスとして付加し、これは**SEOおよびページの発見性**に不可欠です。
570
436
 
437
+ ```vue fileName="components/Links.vue"
571
438
  <script setup lang="ts">
572
- import { computed } from "vue";
573
439
  import { getLocalizedUrl } from "intlayer";
574
440
  import { useLocale } from "vue-intlayer";
575
441
 
576
- const props = defineProps({
577
- to: {
578
- type: String,
579
- required: true,
580
- },
581
- });
442
+ interface Props {
443
+ href: string;
444
+ locale?: string;
445
+ }
582
446
 
583
- const { locale } = useLocale();
447
+ const props = defineProps<Props>();
584
448
 
585
- // リンクが外部リンクかどうかをチェック
586
- const isExternalLink = computed(() => /^https?:\/\//.test(props.to || ""));
449
+ const { locale: currentLocale } = useLocale();
587
450
 
588
- // 内部リンクの場合はローカライズされたhrefを作成
589
- const localizedHref = computed(() =>
590
- isExternalLink.value ? props.to : getLocalizedUrl(props.to, locale.value)
591
- );
451
+ // 最終的なパスを計算する
452
+ const finalPath = computed(() => {
453
+ // 1. リンクが外部かどうかをチェック
454
+ const isExternal = /^https?:\/\//.test(props.href || "");
455
+
456
+ // 2. 外部の場合はそのまま返す(NuxtLinkが<a>タグの生成を処理)
457
+ if (isExternal) return props.href;
458
+
459
+ // 3. 内部リンクの場合、URLをローカライズする
460
+ const targetLocale = props.locale || currentLocale.value;
461
+ return getLocalizedUrl(props.href, targetLocale);
462
+ });
592
463
  </script>
464
+
465
+ <template>
466
+ <NuxtLink :to="finalPath" v-bind="$attrs">
467
+ <slot />
468
+ </NuxtLink>
469
+ </template>
593
470
  ```
594
471
 
595
- 次に、このコンポーネントをアプリケーション全体で使用します:
472
+ 次に、このコンポーネントをアプリケーション全体で使用します:
473
+
474
+ ```vue fileName="layouts/default.vue"
475
+ <script setup lang="ts">
476
+ import Links from "~/components/Links.vue";
477
+ import LocaleSwitcher from "~/components/LocaleSwitcher.vue";
478
+ </script>
596
479
 
597
- ```vue fileName="pages/index.vue"
598
480
  <template>
599
481
  <div>
600
- <LocalizedLink to="/about">
601
- {{ content.aboutLink }}
602
- </LocalizedLink>
603
- <LocalizedLink to="/contact">
604
- {{ content.contactLink }}
605
- </LocalizedLink>
482
+ <header>
483
+ <LocaleSwitcher />
484
+ </header>
485
+ <main>
486
+ <slot />
487
+ </main>
488
+
489
+ <Links href="/">ホーム</Links>
490
+ <Links href="/about">アバウト</Links>
606
491
  </div>
607
492
  </template>
608
-
609
- <script setup lang="ts">
610
- import { useIntlayer } from "vue-intlayer";
611
- import LocalizedLink from "~/components/LocalizedLink.vue";
612
-
613
- const content = useIntlayer("home");
614
- </script>
615
493
  ```
616
494
 
495
+ > `NuxtLink` をローカライズされたパスで使用することで、以下を保証できます:
496
+ >
497
+ > - 検索エンジンがすべての言語バージョンのページをクロールおよびインデックスできる
498
+ > - ユーザーがローカライズされたURLを直接共有できる
499
+ > - ブラウザの履歴がロケール接頭辞付きURLで正しく動作する
500
+
617
501
  ### (オプション)ステップ9:メタデータとSEOの処理
618
502
 
619
- Nuxtは優れたSEO機能を提供します。Intlayerを使ってローカライズされたメタデータを管理できます:
503
+ Nuxtは `useHead` コンポーザブル(自動インポート)を通じて優れたSEO機能を提供します。Intlayerを使って、`.raw` または `.value` アクセサを用いてプリミティブな文字列値を取得し、ローカライズされたメタデータを扱うことができます:
620
504
 
621
505
  ```vue fileName="pages/about.vue"
622
506
  <script setup lang="ts">
623
- import { useSeoMeta } from "nuxt/app";
624
- import { getIntlayer } from "intlayer";
625
- import { useLocale } from "vue-intlayer";
507
+ import { useIntlayer } from "vue-intlayer";
626
508
 
627
- const { locale } = useLocale();
628
- const content = getIntlayer("about-meta", locale.value);
509
+ // useHeadはNuxtで自動インポートされます
510
+ const content = useIntlayer("about-page");
629
511
 
630
- useSeoMeta({
631
- title: content.title,
632
- description: content.description,
512
+ useHead({
513
+ title: content.metaTitle.raw, // プリミティブな文字列アクセスには .raw を使用
514
+ meta: [
515
+ {
516
+ name: "description",
517
+ content: content.metaDescription.raw, // プリミティブな文字列アクセスには .raw を使用
518
+ },
519
+ ],
633
520
  });
634
521
  </script>
635
522
 
636
523
  <template>
637
- <div>
638
- <h1>{{ content.pageTitle }}</h1>
639
- <p>{{ content.pageContent }}</p>
640
- </div>
524
+ <h1><content.title /></h1>
641
525
  </template>
642
526
  ```
643
527
 
644
- 対応するコンテンツ宣言を作成します:
528
+ > あるいは、Vueのリアクティビティなしでコンテンツを取得するために `import { getIntlayer } from "intlayer"` 関数を使用することもできます。
645
529
 
646
- ```ts fileName="pages/about-meta.content.ts"
530
+ > **コンテンツ値へのアクセス方法:**
531
+ >
532
+ > - プリミティブな文字列値(非リアクティブ)を取得するには `.raw` を使用
533
+ > - リアクティブな値を取得するには `.value` を使用
534
+ > - Visual Editorサポートのために `<content.key />` コンポーネント構文を使用
535
+
536
+ 対応するコンテンツ宣言を作成します:
537
+
538
+ ```ts fileName="pages/about-page.content.ts" contentDeclarationFormat="typescript"
647
539
  import { t, type Dictionary } from "intlayer";
648
- import type { useSeoMeta } from "nuxt/app";
649
540
 
650
- const aboutMetaContent = {
651
- key: "about-meta",
541
+ const aboutPageContent = {
542
+ key: "about-page",
652
543
  content: {
653
- title: t({
654
- ja: "私たちについて - 私の会社",
544
+ metaTitle: t({
655
545
  en: "About Us - My Company",
656
546
  fr: "À Propos - Ma Société",
657
547
  es: "Acerca de Nosotros - Mi Empresa",
658
548
  }),
659
- description: t({
660
- ja: "私たちの会社と使命についてもっと知る",
549
+ metaDescription: t({
550
+ ja: "私たちの会社とミッションについて詳しく知る",
661
551
  en: "Learn more about our company and our mission",
662
552
  fr: "En savoir plus sur notre société et notre mission",
663
553
  es: "Conozca más sobre nuestra empresa y nuestra misión",
664
554
  }),
555
+ title: t({
556
+ ja: "私たちについて",
557
+ en: "About Us",
558
+ fr: "À Propos",
559
+ es: "Acerca de Nosotros",
560
+ }),
665
561
  },
666
- } satisfies Dictionary<Parameters<typeof useSeoMeta>[0]>;
562
+ } satisfies Dictionary;
667
563
 
668
- export default aboutMetaContent;
564
+ export default aboutPageContent;
669
565
  ```
670
566
 
671
- ```typescript fileName="pages/about-meta.content.mjs" contentDeclarationFormat="esm"
567
+ ```javascript fileName="pages/about-page.content.mjs" contentDeclarationFormat="esm"
672
568
  import { t } from "intlayer";
673
569
 
674
570
  /** @type {import('intlayer').Dictionary} */
675
- const aboutMetaContent = {
676
- key: "about-meta",
571
+ const aboutPageContent = {
572
+ key: "about-page",
677
573
  content: {
678
- title: t({
679
- zh: "关于我们 - 我的公司",
574
+ metaTitle: t({
680
575
  ja: "私たちについて - 私の会社",
681
576
  en: "About Us - My Company",
682
577
  fr: "À Propos - Ma Société",
683
578
  es: "Acerca de Nosotros - Mi Empresa",
684
579
  }),
685
- description: t({
686
- zh: "了解更多关于我们公司和我们的使命",
687
- ja: "私たちの会社と使命について詳しく知る",
688
- en: "Learn more about our company and our mission",
580
+ metaDescription: t({
581
+ en: "私たちの会社とミッションについて詳しく知る",
689
582
  fr: "En savoir plus sur notre société et notre mission",
690
583
  es: "Conozca más sobre nuestra empresa y nuestra misión",
691
584
  }),
585
+ title: t({
586
+ en: "私たちについて",
587
+ fr: "À Propos",
588
+ es: "Acerca de Nosotros",
589
+ }),
692
590
  },
693
591
  };
694
592
 
695
- export default aboutMetaContent;
593
+ export default aboutPageContent;
696
594
  ```
697
595
 
698
- ```typescript fileName="pages/about-meta.content.js" contentDeclarationFormat="cjs"
596
+ ```javascript fileName="pages/about-page.content.cjs" contentDeclarationFormat="commonjs"
699
597
  const { t } = require("intlayer");
700
598
 
701
599
  /** @type {import('intlayer').Dictionary} */
702
- const aboutMetaContent = {
703
- key: "about-meta",
600
+ const aboutPageContent = {
601
+ key: "about-page",
704
602
  content: {
705
- title: t({
706
- zh: "关于我们 - 我的公司",
707
- ja: "私たちについて - 私の会社",
708
- en: "About Us - My Company",
603
+ metaTitle: t({
604
+ en: "私たちについて - マイカンパニー",
709
605
  fr: "À Propos - Ma Société",
710
606
  es: "Acerca de Nosotros - Mi Empresa",
711
607
  }),
712
- description: t({
713
- zh: "了解更多关于我们公司和我们的使命",
608
+ metaDescription: t({
714
609
  en: "Learn more about our company and our mission",
715
610
  fr: "En savoir plus sur notre société et notre mission",
716
611
  es: "Conozca más sobre nuestra empresa y nuestra misión",
717
- ja: "私たちの会社と使命についてもっと知る",
612
+ }),
613
+ title: t({
614
+ en: "About Us",
615
+ fr: "À Propos",
616
+ es: "Acerca de Nosotros",
718
617
  }),
719
618
  },
720
619
  };
721
620
 
722
- module.exports = aboutMetaContent;
621
+ module.exports = aboutPageContent;
723
622
  ```
724
623
 
725
- ```json fileName="pages/about-meta.content.json" contentDeclarationFormat="json"
624
+ ```json fileName="pages/about-page.content.json" contentDeclarationFormat="json"
726
625
  {
727
- "key": "about-meta",
626
+ "$schema": "https://intlayer.org/schema.json",
627
+ "key": "about-page",
728
628
  "content": {
729
- "title": {
629
+ "metaTitle": {
730
630
  "nodeType": "translation",
731
- "translations": {
732
- "zh": "关于我们 - 我的公司",
631
+ "translation": {
733
632
  "en": "About Us - My Company",
734
633
  "fr": "À Propos - Ma Société",
735
- "es": "Acerca de Nosotros - Mi Empresa",
736
- "ja": "私たちについて - 私の会社"
634
+ "es": "Acerca de Nosotros - Mi Empresa"
737
635
  }
738
636
  },
739
- "description": {
637
+ "metaDescription": {
740
638
  "nodeType": "translation",
741
- "translations": {
742
- "zh": "了解更多关于我们公司和我们的使命",
639
+ "translation": {
743
640
  "en": "Learn more about our company and our mission",
744
641
  "fr": "En savoir plus sur notre société et notre mission",
745
- "es": "Conozca más sobre nuestra empresa y nuestra misión"
642
+ "es": "Conozca más sobre nuestra empresa y nuestra misión",
643
+ "ja": "当社と当社のミッションについて詳しく知る"
644
+ }
645
+ },
646
+ "title": {
647
+ "nodeType": "translation",
648
+ "translation": {
649
+ "en": "About Us",
650
+ "fr": "À Propos",
651
+ "es": "Acerca de Nosotros",
652
+ "ja": "私たちについて"
746
653
  }
747
654
  }
748
655
  }
@@ -753,7 +660,7 @@ module.exports = aboutMetaContent;
753
660
 
754
661
  Intlayerはモジュール拡張を使用してTypeScriptの利点を活かし、コードベースをより強固にします。
755
662
 
756
- ![Autocompletion](https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true)
663
+ ![オートコンプリート](https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true)
757
664
 
758
665
  ![Translation error](https://github.com/aymericzip/intlayer/blob/main/docs/assets/translation_error.png?raw=true)
759
666
 
@@ -763,42 +670,40 @@ TypeScriptの設定に自動生成された型が含まれていることを確
763
670
  {
764
671
  // ... 既存のTypeScript設定
765
672
  "include": [
766
- // ... 既存の TypeScript 設定
673
+ // ... 既存のTypeScript設定
767
674
  ".intlayer/**/*.ts", // 自動生成された型を含める
768
675
  ],
769
676
  }
770
677
  ```
771
678
 
772
- ### Git 設定
679
+ ### Gitの設定
773
680
 
774
- Intlayer によって生成されたファイルは無視することを推奨します。これにより、Git リポジトリに誤ってコミットするのを防げます。
681
+ Intlayerによって生成されたファイルは無視することを推奨します。これにより、Gitリポジトリへの不要なコミットを防ぐことができます。
775
682
 
776
- これを行うには、`.gitignore` ファイルに以下の指示を追加してください。
683
+ これを行うには、`.gitignore`ファイルに以下の指示を追加してください。
777
684
 
778
685
  ```plaintext fileName=".gitignore"
779
- # Intlayer によって生成されたファイルを無視する
686
+ # Intlayerによって生成されたファイルを無視する
780
687
  .intlayer
781
688
  ```
782
689
 
783
- ### VS Code 拡張機能
690
+ ### VS Code拡張機能
784
691
 
785
- Intlayer を使った開発体験を向上させるために、公式の **Intlayer VS Code 拡張機能** をインストールできます。
692
+ Intlayerでの開発体験を向上させるために、公式の**Intlayer VS Code拡張機能**をインストールできます。
786
693
 
787
- [VS Code Marketplace からインストール](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
694
+ [VS Codeマーケットプレイスからインストール](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
788
695
 
789
696
  この拡張機能は以下を提供します:
790
697
 
791
- - 翻訳キーの **オートコンプリート**
792
- - **翻訳が不足している場合のリアルタイムエラー検出**。
793
- - **翻訳内容のインラインプレビュー**。
794
- - **翻訳の作成や更新を簡単に行うクイックアクション**。
698
+ - 翻訳キーの**オートコンプリート**。
699
+ - 欠落している翻訳の**リアルタイムエラー検出**。
700
+ - 翻訳されたコンテンツの**インラインプレビュー**。
701
+ - 翻訳を簡単に作成・更新できる**クイックアクション**。
795
702
 
796
703
  拡張機能の使い方の詳細については、[Intlayer VS Code拡張機能のドキュメント](https://intlayer.org/doc/vs-code-extension)を参照してください。
797
704
 
798
705
  ---
799
706
 
800
- ### さらに進むために
801
-
802
- さらに進むには、[ビジュアルエディター](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_visual_editor.md)を実装するか、[CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_CMS.md)を使用してコンテンツを外部化することができます。
707
+ ### さらに進む
803
708
 
804
- ---
709
+ さらに進めるには、[ビジュアルエディター](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_visual_editor.md)を実装するか、[CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/intlayer_CMS.md)を使用してコンテンツを外部化することができます。