@intlayer/docs 7.1.8-canary.0 → 7.1.9

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.
@@ -142,23 +142,23 @@ Agrega el plugin intlayer en tu configuración.
142
142
 
143
143
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
144
144
  import { defineConfig } from "vite";
145
- import react from "@vitejs/plugin-react-swc";
145
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
146
146
  import { intlayer } from "vite-intlayer";
147
147
 
148
148
  // https://vitejs.dev/config/
149
149
  export default defineConfig({
150
- plugins: [react(), intlayer()],
150
+ plugins: [svelte(), intlayer()],
151
151
  });
152
152
  ```
153
153
 
154
154
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
155
155
  import { defineConfig } from "vite";
156
- import react from "@vitejs/plugin-react-swc";
156
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
157
157
  import { intlayer } from "vite-intlayer";
158
158
 
159
159
  // https://vitejs.dev/config/
160
160
  export default defineConfig({
161
- plugins: [react(), intlayer()],
161
+ plugins: [svelte(), intlayer()],
162
162
  });
163
163
  ```
164
164
 
@@ -184,7 +184,13 @@ import { t, type Dictionary } from "intlayer";
184
184
 
185
185
  const appContent = {
186
186
  key: "app",
187
- content: {},
187
+ content: {
188
+ title: t({
189
+ en: "Hello World",
190
+ fr: "Bonjour le monde",
191
+ es: "Hola mundo",
192
+ }),
193
+ },
188
194
  } satisfies Dictionary;
189
195
 
190
196
  export default appContent;
@@ -196,7 +202,13 @@ import { t } from "intlayer";
196
202
  /** @type {import('intlayer').Dictionary} */
197
203
  const appContent = {
198
204
  key: "app",
199
- content: {},
205
+ content: {
206
+ title: t({
207
+ en: "Hello World",
208
+ fr: "Bonjour le monde",
209
+ es: "Hola mundo",
210
+ }),
211
+ },
200
212
  };
201
213
 
202
214
  export default appContent;
@@ -209,7 +221,13 @@ const { t } = require("intlayer");
209
221
  // Declaración del contenido de la aplicación
210
222
  const appContent = {
211
223
  key: "app",
212
- content: {},
224
+ content: {
225
+ title: t({
226
+ en: "Hello World",
227
+ fr: "Bonjour le monde",
228
+ es: "Hola mundo",
229
+ }),
230
+ },
213
231
  };
214
232
 
215
233
  module.exports = appContent;
@@ -219,7 +237,16 @@ module.exports = appContent;
219
237
  {
220
238
  "$schema": "https://intlayer.org/schema.json",
221
239
  "key": "app",
222
- "content": {}
240
+ "content": {
241
+ "title": {
242
+ "nodeType": "translation",
243
+ "translation": {
244
+ "en": "Hello World",
245
+ "fr": "Bonjour le monde",
246
+ "es": "Hola mundo"
247
+ }
248
+ }
249
+ }
223
250
  }
224
251
  ```
225
252
 
@@ -141,23 +141,23 @@ Ajoutez le plugin intlayer dans votre configuration.
141
141
 
142
142
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
143
143
  import { defineConfig } from "vite";
144
- import react from "@vitejs/plugin-react-swc";
144
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
145
145
  import { intlayer } from "vite-intlayer";
146
146
 
147
147
  // https://vitejs.dev/config/
148
148
  export default defineConfig({
149
- plugins: [react(), intlayer()],
149
+ plugins: [svelte(), intlayer()],
150
150
  });
151
151
  ```
152
152
 
153
153
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
154
154
  import { defineConfig } from "vite";
155
- import react from "@vitejs/plugin-react-swc";
155
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
156
156
  import { intlayer } from "vite-intlayer";
157
157
 
158
158
  // https://vitejs.dev/config/
159
159
  export default defineConfig({
160
- plugins: [react(), intlayer()],
160
+ plugins: [svelte(), intlayer()],
161
161
  });
162
162
  ```
163
163
 
@@ -183,7 +183,13 @@ import { t, type Dictionary } from "intlayer";
183
183
 
184
184
  const appContent = {
185
185
  key: "app",
186
- content: {},
186
+ content: {
187
+ title: t({
188
+ en: "Hello World",
189
+ fr: "Bonjour le monde",
190
+ es: "Hola mundo",
191
+ }),
192
+ },
187
193
  } satisfies Dictionary;
188
194
 
189
195
  export default appContent;
@@ -195,7 +201,13 @@ import { t } from "intlayer";
195
201
  /** @type {import('intlayer').Dictionary} */
196
202
  const appContent = {
197
203
  key: "app",
198
- content: {},
204
+ content: {
205
+ title: t({
206
+ en: "Hello World",
207
+ fr: "Bonjour le monde",
208
+ es: "Hola mundo",
209
+ }),
210
+ },
199
211
  };
200
212
 
201
213
  export default appContent;
@@ -208,7 +220,13 @@ const { t } = require("intlayer");
208
220
  // Déclaration du contenu de l'application
209
221
  const appContent = {
210
222
  key: "app",
211
- content: {},
223
+ content: {
224
+ title: t({
225
+ en: "Hello World",
226
+ fr: "Bonjour le monde",
227
+ es: "Hola mundo",
228
+ }),
229
+ },
212
230
  };
213
231
 
214
232
  module.exports = appContent;
@@ -218,7 +236,16 @@ module.exports = appContent;
218
236
  {
219
237
  "$schema": "https://intlayer.org/schema.json",
220
238
  "key": "app",
221
- "content": {}
239
+ "content": {
240
+ "title": {
241
+ "nodeType": "translation",
242
+ "translation": {
243
+ "en": "Hello World",
244
+ "fr": "Bonjour le monde",
245
+ "es": "Hola mundo"
246
+ }
247
+ }
248
+ }
222
249
  }
223
250
  ```
224
251
 
@@ -141,23 +141,23 @@ module.exports = config;
141
141
 
142
142
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
143
143
  import { defineConfig } from "vite";
144
- import react from "@vitejs/plugin-react-swc";
144
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
145
145
  import { intlayer } from "vite-intlayer";
146
146
 
147
147
  // https://vitejs.dev/config/
148
148
  export default defineConfig({
149
- plugins: [react(), intlayer()],
149
+ plugins: [svelte(), intlayer()],
150
150
  });
151
151
  ```
152
152
 
153
153
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
154
154
  import { defineConfig } from "vite";
155
- import react from "@vitejs/plugin-react-swc";
155
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
156
156
  import { intlayer } from "vite-intlayer";
157
157
 
158
158
  // https://vitejs.dev/config/
159
159
  export default defineConfig({
160
- plugins: [react(), intlayer()],
160
+ plugins: [svelte(), intlayer()],
161
161
  });
162
162
  ```
163
163
 
@@ -183,7 +183,13 @@ import { t, type Dictionary } from "intlayer";
183
183
 
184
184
  const appContent = {
185
185
  key: "app",
186
- content: {},
186
+ content: {
187
+ title: t({
188
+ en: "Hello World",
189
+ fr: "Bonjour le monde",
190
+ es: "Hola mundo",
191
+ }),
192
+ },
187
193
  } satisfies Dictionary;
188
194
 
189
195
  export default appContent;
@@ -200,7 +206,13 @@ const { t } = require("intlayer");
200
206
  // सामग्री घोषणा के लिए टाइप निर्दिष्ट करता है
201
207
  const appContent = {
202
208
  key: "app",
203
- content: {},
209
+ content: {
210
+ title: t({
211
+ en: "Hello World",
212
+ fr: "Bonjour le monde",
213
+ es: "Hola mundo",
214
+ }),
215
+ },
204
216
  };
205
217
 
206
218
  module.exports = appContent;
@@ -210,7 +222,16 @@ module.exports = appContent;
210
222
  {
211
223
  "$schema": "https://intlayer.org/schema.json",
212
224
  "key": "app",
213
- "content": {}
225
+ "content": {
226
+ "title": {
227
+ "nodeType": "translation",
228
+ "translation": {
229
+ "en": "Hello World",
230
+ "fr": "Bonjour le monde",
231
+ "es": "Hola mundo"
232
+ }
233
+ }
234
+ }
214
235
  }
215
236
  ```
216
237
 
@@ -145,23 +145,23 @@ Tambahkan plugin intlayer ke dalam konfigurasi Anda.
145
145
 
146
146
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
147
147
  import { defineConfig } from "vite";
148
- import react from "@vitejs/plugin-react-swc";
148
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
149
149
  import { intlayer } from "vite-intlayer";
150
150
 
151
151
  // https://vitejs.dev/config/
152
152
  export default defineConfig({
153
- plugins: [react(), intlayer()],
153
+ plugins: [svelte(), intlayer()],
154
154
  });
155
155
  ```
156
156
 
157
157
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
158
158
  import { defineConfig } from "vite";
159
- import react from "@vitejs/plugin-react-swc";
159
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
160
160
  import { intlayer } from "vite-intlayer";
161
161
 
162
162
  // https://vitejs.dev/config/
163
163
  export default defineConfig({
164
- plugins: [react(), intlayer()],
164
+ plugins: [svelte(), intlayer()],
165
165
  });
166
166
  ```
167
167
 
@@ -187,7 +187,13 @@ import { t, type Dictionary } from "intlayer";
187
187
 
188
188
  const appContent = {
189
189
  key: "app",
190
- content: {},
190
+ content: {
191
+ title: t({
192
+ en: "Hello World",
193
+ fr: "Bonjour le monde",
194
+ es: "Hola mundo",
195
+ }),
196
+ },
191
197
  } satisfies Dictionary;
192
198
 
193
199
  export default appContent;
@@ -199,7 +205,13 @@ import { t } from "intlayer";
199
205
  /** @type {import('intlayer').Dictionary} */
200
206
  const appContent = {
201
207
  key: "app",
202
- content: {},
208
+ content: {
209
+ title: t({
210
+ en: "Hello World",
211
+ fr: "Bonjour le monde",
212
+ es: "Hola mundo",
213
+ }),
214
+ },
203
215
  };
204
216
 
205
217
  export default appContent;
@@ -212,7 +224,13 @@ const { t } = require("intlayer");
212
224
  // Deklarasi konten aplikasi
213
225
  const appContent = {
214
226
  key: "app",
215
- content: {},
227
+ content: {
228
+ title: t({
229
+ en: "Hello World",
230
+ fr: "Bonjour le monde",
231
+ es: "Hola mundo",
232
+ }),
233
+ },
216
234
  };
217
235
 
218
236
  module.exports = appContent;
@@ -222,7 +240,16 @@ module.exports = appContent;
222
240
  {
223
241
  "$schema": "https://intlayer.org/schema.json",
224
242
  "key": "app",
225
- "content": {}
243
+ "content": {
244
+ "title": {
245
+ "nodeType": "translation",
246
+ "translation": {
247
+ "en": "Hello World",
248
+ "fr": "Bonjour le monde",
249
+ "es": "Hola mundo"
250
+ }
251
+ }
252
+ }
226
253
  }
227
254
  ```
228
255
 
@@ -141,23 +141,23 @@ Aggiungi il plugin intlayer nella tua configurazione.
141
141
 
142
142
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
143
143
  import { defineConfig } from "vite";
144
- import react from "@vitejs/plugin-react-swc";
144
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
145
145
  import { intlayer } from "vite-intlayer";
146
146
 
147
147
  // https://vitejs.dev/config/
148
148
  export default defineConfig({
149
- plugins: [react(), intlayer()],
149
+ plugins: [svelte(), intlayer()],
150
150
  });
151
151
  ```
152
152
 
153
153
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
154
154
  import { defineConfig } from "vite";
155
- import react from "@vitejs/plugin-react-swc";
155
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
156
156
  import { intlayer } from "vite-intlayer";
157
157
 
158
158
  // https://vitejs.dev/config/
159
159
  export default defineConfig({
160
- plugins: [react(), intlayer()],
160
+ plugins: [svelte(), intlayer()],
161
161
  });
162
162
  ```
163
163
 
@@ -183,7 +183,13 @@ import { t, type Dictionary } from "intlayer";
183
183
 
184
184
  const appContent = {
185
185
  key: "app",
186
- content: {},
186
+ content: {
187
+ title: t({
188
+ en: "Hello World",
189
+ fr: "Bonjour le monde",
190
+ es: "Hola mundo",
191
+ }),
192
+ },
187
193
  } satisfies Dictionary;
188
194
 
189
195
  export default appContent;
@@ -195,7 +201,13 @@ import { t } from "intlayer";
195
201
  /** @type {import('intlayer').Dictionary} */
196
202
  const appContent = {
197
203
  key: "app",
198
- content: {},
204
+ content: {
205
+ title: t({
206
+ en: "Hello World",
207
+ fr: "Bonjour le monde",
208
+ es: "Hola mundo",
209
+ }),
210
+ },
199
211
  };
200
212
 
201
213
  export default appContent;
@@ -208,7 +220,13 @@ const { t } = require("intlayer");
208
220
  // Dizionario dei contenuti dell'applicazione
209
221
  const appContent = {
210
222
  key: "app",
211
- content: {},
223
+ content: {
224
+ title: t({
225
+ en: "Hello World",
226
+ fr: "Bonjour le monde",
227
+ es: "Hola mundo",
228
+ }),
229
+ },
212
230
  };
213
231
 
214
232
  module.exports = appContent;
@@ -218,7 +236,16 @@ module.exports = appContent;
218
236
  {
219
237
  "$schema": "https://intlayer.org/schema.json",
220
238
  "key": "app",
221
- "content": {}
239
+ "content": {
240
+ "title": {
241
+ "nodeType": "translation",
242
+ "translation": {
243
+ "en": "Hello World",
244
+ "fr": "Bonjour le monde",
245
+ "es": "Hola mundo"
246
+ }
247
+ }
248
+ }
222
249
  }
223
250
  ```
224
251
 
@@ -143,23 +143,23 @@ module.exports = config;
143
143
 
144
144
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
145
145
  import { defineConfig } from "vite";
146
- import react from "@vitejs/plugin-react-swc";
146
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
147
147
  import { intlayer } from "vite-intlayer";
148
148
 
149
149
  // https://vitejs.dev/config/
150
150
  export default defineConfig({
151
- plugins: [react(), intlayer()],
151
+ plugins: [svelte(), intlayer()],
152
152
  });
153
153
  ```
154
154
 
155
155
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
156
156
  import { defineConfig } from "vite";
157
- import react from "@vitejs/plugin-react-swc";
157
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
158
158
  import { intlayer } from "vite-intlayer";
159
159
 
160
160
  // https://vitejs.dev/config/
161
161
  export default defineConfig({
162
- plugins: [react(), intlayer()],
162
+ plugins: [svelte(), intlayer()],
163
163
  });
164
164
  ```
165
165
 
@@ -185,7 +185,13 @@ import { t, type Dictionary } from "intlayer";
185
185
 
186
186
  const appContent = {
187
187
  key: "app",
188
- content: {},
188
+ content: {
189
+ title: t({
190
+ en: "Hello World",
191
+ fr: "Bonjour le monde",
192
+ es: "Hola mundo",
193
+ }),
194
+ },
189
195
  } satisfies Dictionary;
190
196
 
191
197
  export default appContent;
@@ -197,7 +203,13 @@ import { t } from "intlayer";
197
203
  /** @type {import('intlayer').Dictionary} */
198
204
  const appContent = {
199
205
  key: "app",
200
- content: {},
206
+ content: {
207
+ title: t({
208
+ en: "Hello World",
209
+ fr: "Bonjour le monde",
210
+ es: "Hola mundo",
211
+ }),
212
+ },
201
213
  };
202
214
 
203
215
  export default appContent;
@@ -210,7 +222,13 @@ const { t } = require("intlayer");
210
222
  // アプリケーションのコンテンツ宣言
211
223
  const appContent = {
212
224
  key: "app",
213
- content: {},
225
+ content: {
226
+ title: t({
227
+ en: "Hello World",
228
+ fr: "Bonjour le monde",
229
+ es: "Hola mundo",
230
+ }),
231
+ },
214
232
  };
215
233
 
216
234
  module.exports = appContent;
@@ -220,7 +238,16 @@ module.exports = appContent;
220
238
  {
221
239
  "$schema": "https://intlayer.org/schema.json",
222
240
  "key": "app",
223
- "content": {}
241
+ "content": {
242
+ "title": {
243
+ "nodeType": "translation",
244
+ "translation": {
245
+ "en": "Hello World",
246
+ "fr": "Bonjour le monde",
247
+ "es": "Hola mundo"
248
+ }
249
+ }
250
+ }
224
251
  }
225
252
  ```
226
253
 
@@ -173,12 +173,12 @@ intlayer 플러그인을 구성에 추가하세요.
173
173
 
174
174
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
175
175
  import { defineConfig } from "vite";
176
- import react from "@vitejs/plugin-react-swc";
176
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
177
177
  import { intlayer } from "vite-intlayer";
178
178
 
179
179
  // https://vitejs.dev/config/
180
180
  export default defineConfig({
181
- plugins: [react(), intlayer()],
181
+ plugins: [svelte(), intlayer()],
182
182
  });
183
183
  ```
184
184
 
@@ -190,12 +190,12 @@ intlayer 플러그인을 구성에 추가하세요.
190
190
 
191
191
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
192
192
  import { defineConfig } from "vite";
193
- import react from "@vitejs/plugin-react-swc";
193
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
194
194
  import { intlayer } from "vite-intlayer";
195
195
 
196
196
  // https://vitejs.dev/config/
197
197
  export default defineConfig({
198
- plugins: [react(), intlayer()],
198
+ plugins: [svelte(), intlayer()],
199
199
  });
200
200
  ```
201
201
 
@@ -207,23 +207,22 @@ intlayer 플러그인을 구성에 추가하세요.
207
207
 
208
208
  ```typescript fileName="vite.config.ts" codeFormat="typescript"
209
209
  import { defineConfig } from "vite";
210
- import react from "@vitejs/plugin-react-swc";
210
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
211
211
  import { intlayer } from "vite-intlayer";
212
212
 
213
213
  // https://vitejs.dev/config/
214
214
  export default defineConfig({
215
- plugins: [react(), intlayer()],
216
- });
215
+ plugins: [svelte(), intlayer()],});
217
216
  ````
218
217
 
219
218
  ```javascript fileName="vite.config.mjs" codeFormat="esm"
220
219
  import { defineConfig } from "vite";
221
- import react from "@vitejs/plugin-react-swc";
220
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
222
221
  import { intlayer } from "vite-intlayer";
223
222
 
224
223
  // https://vitejs.dev/config/
225
224
  export default defineConfig({
226
- plugins: [react(), intlayer()],
225
+ plugins: [svelte(), intlayer()],
227
226
  });
228
227
  ```
229
228
 
@@ -249,7 +248,13 @@ import { t, type Dictionary } from "intlayer";
249
248
 
250
249
  const appContent = {
251
250
  key: "app",
252
- content: {},
251
+ content: {
252
+ title: t({
253
+ en: "Hello World",
254
+ fr: "Bonjour le monde",
255
+ es: "Hola mundo",
256
+ }),
257
+ },
253
258
  } satisfies Dictionary;
254
259
 
255
260
  export default appContent;
@@ -272,7 +277,13 @@ import { t, type Dictionary } from "intlayer";
272
277
 
273
278
  const appContent = {
274
279
  key: "app",
275
- content: {},
280
+ content: {
281
+ title: t({
282
+ en: "Hello World",
283
+ fr: "Bonjour le monde",
284
+ es: "Hola mundo",
285
+ }),
286
+ },
276
287
  } satisfies Dictionary;
277
288
 
278
289
  export default appContent;
@@ -284,7 +295,13 @@ import { t } from "intlayer";
284
295
  /** @type {import('intlayer').Dictionary} */
285
296
  const appContent = {
286
297
  key: "app",
287
- content: {},
298
+ content: {
299
+ title: t({
300
+ en: "Hello World",
301
+ fr: "Bonjour le monde",
302
+ es: "Hola mundo",
303
+ }),
304
+ },
288
305
  };
289
306
 
290
307
  export default appContent;
@@ -297,7 +314,13 @@ const { t } = require("intlayer");
297
314
  // Intlayer 사전 타입 지정
298
315
  const appContent = {
299
316
  key: "app",
300
- content: {},
317
+ content: {
318
+ title: t({
319
+ en: "Hello World",
320
+ fr: "Bonjour le monde",
321
+ es: "Hola mundo",
322
+ }),
323
+ },
301
324
  };
302
325
 
303
326
  module.exports = appContent;
@@ -307,7 +330,16 @@ module.exports = appContent;
307
330
  {
308
331
  "$schema": "https://intlayer.org/schema.json",
309
332
  "key": "app",
310
- "content": {}
333
+ "content": {
334
+ "title": {
335
+ "nodeType": "translation",
336
+ "translation": {
337
+ "en": "Hello World",
338
+ "fr": "Bonjour le monde",
339
+ "es": "Hola mundo"
340
+ }
341
+ }
342
+ }
311
343
  }
312
344
  ```
313
345