@intlayer/docs 7.1.7 → 7.1.8-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-04-18
3
- updatedAt: 2025-06-29
3
+ updatedAt: 2025-11-19
4
4
  title: How to translate your Vite and Svelte app – i18n guide 2025
5
5
  description: Discover how to make your Vite and Svelte website multilingual. Follow the documentation to internationalize (i18n) and translate it.
6
6
  keywords:
@@ -14,7 +14,7 @@ slugs:
14
14
  - doc
15
15
  - environment
16
16
  - vite-and-svelte
17
- # applicationTemplate: https://github.com/aymericzip/intlayer-vite-svelte-template
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-vite-svelte-template
18
18
  history:
19
19
  - version: 5.5.10
20
20
  date: 2025-06-29
@@ -79,7 +79,7 @@ yarn add vite-intlayer --save-dev
79
79
 
80
80
  Create a config file to configure the languages of your application:
81
81
 
82
- ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
82
+ ```typescript fileName="intlayer.config.ts"
83
83
  import { Locales, type IntlayerConfig } from "intlayer";
84
84
 
85
85
  const config: IntlayerConfig = {
@@ -97,80 +97,20 @@ const config: IntlayerConfig = {
97
97
  export default config;
98
98
  ```
99
99
 
100
- ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
101
- import { Locales } from "intlayer";
102
-
103
- /** @type {import('intlayer').IntlayerConfig} */
104
- const config = {
105
- internationalization: {
106
- locales: [
107
- Locales.ENGLISH,
108
- Locales.FRENCH,
109
- Locales.SPANISH,
110
- // Your other locales
111
- ],
112
- defaultLocale: Locales.ENGLISH,
113
- },
114
- };
115
-
116
- export default config;
117
- ```
118
-
119
- ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
120
- const { Locales } = require("intlayer");
121
-
122
- /** @type {import('intlayer').IntlayerConfig} */
123
- const config = {
124
- internationalization: {
125
- locales: [
126
- Locales.ENGLISH,
127
- Locales.FRENCH,
128
- Locales.SPANISH,
129
- // Your other locales
130
- ],
131
- defaultLocale: Locales.ENGLISH,
132
- },
133
- };
134
-
135
- module.exports = config;
136
- ```
137
-
138
100
  > Through this configuration file, you can set up localized URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md).
139
101
 
140
102
  ### Step 3: Integrate Intlayer in Your Vite Configuration
141
103
 
142
104
  Add the intlayer plugin into your configuration.
143
105
 
144
- ```typescript fileName="vite.config.ts" codeFormat="typescript"
106
+ ```typescript fileName="vite.config.ts"
145
107
  import { defineConfig } from "vite";
146
- import react from "@vitejs/plugin-react-swc";
108
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
147
109
  import { intlayer } from "vite-intlayer";
148
110
 
149
111
  // https://vitejs.dev/config/
150
112
  export default defineConfig({
151
- plugins: [react(), intlayer()],
152
- });
153
- ```
154
-
155
- ```javascript fileName="vite.config.mjs" codeFormat="esm"
156
- import { defineConfig } from "vite";
157
- import react from "@vitejs/plugin-react-swc";
158
- import { intlayer } from "vite-intlayer";
159
-
160
- // https://vitejs.dev/config/
161
- export default defineConfig({
162
- plugins: [react(), intlayer()],
163
- });
164
- ```
165
-
166
- ```javascript fileName="vite.config.cjs" codeFormat="commonjs"
167
- const { defineConfig } = require("vite");
168
- const react = require("@vitejs/plugin-react-swc");
169
- const { intlayer } = require("vite-intlayer");
170
-
171
- // https://vitejs.dev/config/
172
- module.exports = defineConfig({
173
- plugins: [react(), intlayer()],
113
+ plugins: [svelte(), intlayer()],
174
114
  });
175
115
  ```
176
116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/docs",
3
- "version": "7.1.7",
3
+ "version": "7.1.8-canary.0",
4
4
  "private": false,
5
5
  "description": "Intlayer documentation",
6
6
  "keywords": [
@@ -72,13 +72,13 @@
72
72
  "watch": "webpack --config ./webpack.config.ts --watch"
73
73
  },
74
74
  "dependencies": {
75
- "@intlayer/config": "7.1.7",
76
- "@intlayer/core": "7.1.7",
77
- "@intlayer/types": "7.1.7"
75
+ "@intlayer/config": "7.1.8-canary.0",
76
+ "@intlayer/core": "7.1.8-canary.0",
77
+ "@intlayer/types": "7.1.8-canary.0"
78
78
  },
79
79
  "devDependencies": {
80
- "@intlayer/api": "7.1.7",
81
- "@intlayer/cli": "7.1.7",
80
+ "@intlayer/api": "7.1.8-canary.0",
81
+ "@intlayer/cli": "7.1.8-canary.0",
82
82
  "@types/node": "24.10.1",
83
83
  "@utils/ts-config": "1.0.4",
84
84
  "@utils/ts-config-types": "1.0.4",