intlayer 3.5.11 → 4.0.2
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/README.md +282 -149
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -17,25 +17,78 @@
|
|
|
17
17
|
</a>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# intlayer: NPM Package to Manage Multilingual Content Declaration (i18n)
|
|
21
21
|
|
|
22
|
-
**Intlayer** is
|
|
22
|
+
**Intlayer** is a suite of packages designed specifically for JavaScript developers. It is compatible with frameworks like React, Next.js, and Express.js.
|
|
23
|
+
|
|
24
|
+
**The `intlayer` package** allows you to declare your content anywhere in your code. It converts multilingual content declarations into structured dictionaries that integrate seamlessly into your application. With TypeScript, **Intlayer** enhances your development by providing stronger, more efficient tools.
|
|
25
|
+
|
|
26
|
+
## Why to integrate Intlayer?
|
|
27
|
+
|
|
28
|
+
- **JavaScript-Powered Content Management**: Harness the flexibility of JavaScript to define and manage your content efficiently.
|
|
29
|
+
- **Type-Safe Environment**: Leverage TypeScript to ensure all your content definitions are precise and error-free.
|
|
30
|
+
- **Integrated Content Files**: Keep your translations close to their respective components, enhancing maintainability and clarity.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
Install the necessary package using your preferred package manager:
|
|
35
|
+
|
|
36
|
+
```bash packageManager="npm"
|
|
37
|
+
npm install intlayer
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```bash packageManager="pnpm"
|
|
41
|
+
pnpm add intlayer
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```bash packageManager="yarn"
|
|
45
|
+
yarn add intlayer
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Configure Intlayer
|
|
49
|
+
|
|
50
|
+
Intlayer provides a configuration file to set up your project. Place this file in the root of your project.
|
|
51
|
+
|
|
52
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
53
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
54
|
+
|
|
55
|
+
const config: IntlayerConfig = {
|
|
56
|
+
internationalization: {
|
|
57
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
58
|
+
defaultLocale: Locales.ENGLISH,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default config;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
> For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en/configuration.md).
|
|
23
66
|
|
|
24
67
|
## Example of usage
|
|
25
68
|
|
|
26
|
-
|
|
69
|
+
With Intlayer, you can declare your content in a structured way anywhere in your codebase.
|
|
70
|
+
|
|
71
|
+
By default, Intlayer scans for files with the extension `.content.{ts,tsx,js,jsx,mjs,cjs}`.
|
|
72
|
+
|
|
73
|
+
> YYou can modify the default extension by setting the `contentDir` property in the [configuration file](https://github.com/aymericzip/intlayer/blob/main/docs/en/configuration.md).
|
|
74
|
+
|
|
75
|
+
```bash codeFormat="typescript"
|
|
27
76
|
.
|
|
28
|
-
├──
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
77
|
+
├── intlayer.config.ts
|
|
78
|
+
└── src
|
|
79
|
+
├── ClientComponent
|
|
80
|
+
│ ├── index.content.ts
|
|
81
|
+
│ └── index.tsx
|
|
82
|
+
└── ServerComponent
|
|
83
|
+
├── index.content.ts
|
|
84
|
+
└── index.tsx
|
|
34
85
|
```
|
|
35
86
|
|
|
36
|
-
|
|
37
|
-
|
|
87
|
+
### Declare your content
|
|
88
|
+
|
|
89
|
+
Here’s an example of content declaration:
|
|
38
90
|
|
|
91
|
+
```tsx filePath="src/ClientComponent/index.content.ts" codeFormat="typescript"
|
|
39
92
|
import { type DeclarationContent, t } from "intlayer";
|
|
40
93
|
|
|
41
94
|
const clientComponentContent = {
|
|
@@ -46,195 +99,275 @@ const clientComponentContent = {
|
|
|
46
99
|
fr: "Bonjour le monde",
|
|
47
100
|
es: "Hola Mundo",
|
|
48
101
|
}),
|
|
102
|
+
numberOfCar: enu({
|
|
103
|
+
"<-1": "Less than minus one car",
|
|
104
|
+
"-1": "Minus one car",
|
|
105
|
+
"0": "No cars",
|
|
106
|
+
"1": "One car",
|
|
107
|
+
">5": "Some cars",
|
|
108
|
+
">19": "Many cars",
|
|
109
|
+
}),
|
|
49
110
|
},
|
|
50
111
|
} satisfies DeclarationContent;
|
|
51
112
|
|
|
52
113
|
export default clientComponentContent;
|
|
53
114
|
```
|
|
54
115
|
|
|
55
|
-
|
|
56
|
-
// ./ClientComponent/index.tsx
|
|
57
|
-
"use client";
|
|
116
|
+
### Build your dictionaries
|
|
58
117
|
|
|
59
|
-
|
|
118
|
+
You can build your dictionaries using the [intlayer-cli](https://github.com/aymericzip/intlayer/blob/main/packages/intlayer-cli/readme.md).
|
|
60
119
|
|
|
61
|
-
|
|
62
|
-
|
|
120
|
+
```bash packageManager="npm"
|
|
121
|
+
npx intlayer build
|
|
122
|
+
```
|
|
63
123
|
|
|
64
|
-
|
|
65
|
-
|
|
124
|
+
```bash packageManager="yarn"
|
|
125
|
+
yarn intlayer build
|
|
66
126
|
```
|
|
67
127
|
|
|
68
|
-
|
|
128
|
+
```bash packageManager="pnpm"
|
|
129
|
+
pnpm intlayer build
|
|
130
|
+
```
|
|
69
131
|
|
|
70
|
-
|
|
71
|
-
- **Type-Safe Environment**: Leverage TypeScript to ensure all your content definitions are precise and error-free.
|
|
72
|
-
- **Integrated Content Files**: Keep your translations close to their respective components, enhancing maintainability and clarity.
|
|
132
|
+
This command scans all `*.content.*` files, compiles them, and writes the results to the directory specified in your **`intlayer.config.ts`** (by default, `./.intlayer`).
|
|
73
133
|
|
|
74
|
-
|
|
134
|
+
A typical output might look like:
|
|
75
135
|
|
|
76
|
-
|
|
136
|
+
```bash
|
|
137
|
+
.
|
|
138
|
+
├── .intlayer
|
|
139
|
+
│ ├── dictionary # Contain the dictionary of your content
|
|
140
|
+
│ │ ├── client-component.json
|
|
141
|
+
│ │ └── server-component.json
|
|
142
|
+
│ ├── main # Contain the entry point of your dictionary to be used in your application
|
|
143
|
+
│ │ ├── dictionary.cjs
|
|
144
|
+
│ │ └── dictionary.mjs
|
|
145
|
+
│ └── types # Contain the auto-generated type definitions of your dictionary
|
|
146
|
+
│ ├── client-component.d.ts
|
|
147
|
+
│ └── server-component.d.ts
|
|
148
|
+
└── types
|
|
149
|
+
└── intlayer.d.ts # Contain the auto-generated type definitions of Intlayer
|
|
150
|
+
```
|
|
77
151
|
|
|
78
|
-
|
|
79
|
-
And to interpret intlayer dictionaries you can interpreters, such as [react-intlayer](https://github.com/aymericzip/intlayer/blob/main/packages/react-intlayer/README.md) [next-intlayer](https://github.com/aymericzip/intlayer/blob/main/packages/next-intlayer/README.md)
|
|
152
|
+
### Build i18next resources
|
|
80
153
|
|
|
81
|
-
|
|
154
|
+
Intlayer can be configured to build dictionaries for [i18next](https://www.i18next.com/). For that you need to add the following configuration to your `intlayer.config.ts` file:
|
|
82
155
|
|
|
83
|
-
|
|
156
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
157
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
84
158
|
|
|
85
|
-
|
|
159
|
+
const config: IntlayerConfig = {
|
|
160
|
+
/* ... */
|
|
161
|
+
content: {
|
|
162
|
+
// Tells Intlayer to generate message files for i18next
|
|
163
|
+
dictionaryOutput: ["i18next"],
|
|
86
164
|
|
|
87
|
-
|
|
165
|
+
// The directory where Intlayer will write your message JSON files
|
|
166
|
+
i18nextResourcesDir: "./i18next/resources",
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
```
|
|
88
170
|
|
|
89
|
-
```
|
|
90
|
-
|
|
171
|
+
```typescript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
172
|
+
import { Locales } from "intlayer";
|
|
173
|
+
|
|
174
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
175
|
+
const config = {
|
|
176
|
+
/* ... */
|
|
177
|
+
content: {
|
|
178
|
+
// Tells Intlayer to generate message files for i18next
|
|
179
|
+
dictionaryOutput: ["i18next"],
|
|
180
|
+
|
|
181
|
+
// The directory where Intlayer will write your message JSON files
|
|
182
|
+
i18nextResourcesDir: "./i18next/resources",
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export default config;
|
|
91
187
|
```
|
|
92
188
|
|
|
93
|
-
```
|
|
94
|
-
|
|
189
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
190
|
+
const { Locales } = require("intlayer");
|
|
191
|
+
|
|
192
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
193
|
+
const config = {
|
|
194
|
+
/* ... */
|
|
195
|
+
content: {
|
|
196
|
+
// Tells Intlayer to generate message files for i18next
|
|
197
|
+
dictionaryOutput: ["i18next"],
|
|
198
|
+
|
|
199
|
+
// The directory where Intlayer will write your message JSON files
|
|
200
|
+
i18nextResourcesDir: "./i18next/resources",
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
module.exports = config;
|
|
95
205
|
```
|
|
96
206
|
|
|
207
|
+
> For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en/configuration.md).
|
|
208
|
+
|
|
209
|
+
Output:
|
|
210
|
+
|
|
97
211
|
```bash
|
|
98
|
-
|
|
212
|
+
.
|
|
213
|
+
└── i18next
|
|
214
|
+
└── resources
|
|
215
|
+
├── en
|
|
216
|
+
│ ├── client-component.json
|
|
217
|
+
│ └── server-component.json
|
|
218
|
+
├── es
|
|
219
|
+
│ ├── client-component.json
|
|
220
|
+
│ └── server-component.json
|
|
221
|
+
└── fr
|
|
222
|
+
├── client-component.json
|
|
223
|
+
└── server-component.json
|
|
99
224
|
```
|
|
100
225
|
|
|
101
|
-
|
|
226
|
+
For example, the **en/client-component.json** might look like:
|
|
102
227
|
|
|
103
|
-
|
|
228
|
+
```json filePath="intlayer/dictionary/en/client-component.json"
|
|
229
|
+
{
|
|
230
|
+
"myTranslatedContent": "Hello World",
|
|
231
|
+
"zero_numberOfCar": "No cars",
|
|
232
|
+
"one_numberOfCar": "One car",
|
|
233
|
+
"two_numberOfCar": "Two cars",
|
|
234
|
+
"other_numberOfCar": "Some cars"
|
|
235
|
+
}
|
|
236
|
+
```
|
|
104
237
|
|
|
105
|
-
|
|
238
|
+
### Build i18next or next-intl dictionaries
|
|
106
239
|
|
|
107
|
-
|
|
108
|
-
// src/app/[locale]/page.content.ts
|
|
109
|
-
import { t, enu, type DeclarationContent } from "intlayer";
|
|
240
|
+
Intlayer can be configured to build dictionaries for [i18next](https://www.i18next.com/) or [next-intl](https://github.com/formatjs/react-intl/tree/main/packages/next-intl). For that you need to add the following configuration to your `intlayer.config.ts` file:
|
|
110
241
|
|
|
111
|
-
|
|
112
|
-
|
|
242
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
243
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
244
|
+
|
|
245
|
+
const config: IntlayerConfig = {
|
|
246
|
+
/* ... */
|
|
113
247
|
content: {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
en: "Get started by editing",
|
|
117
|
-
fr: "Commencez par éditer",
|
|
118
|
-
es: "Comience por editar",
|
|
119
|
-
}),
|
|
120
|
-
pageLink: "src/app/page.tsx",
|
|
121
|
-
},
|
|
122
|
-
nestedContent: {
|
|
123
|
-
id: "enumeration",
|
|
124
|
-
numberOfCar: enu({
|
|
125
|
-
"<-1": "Less than minus one car",
|
|
126
|
-
"-1": "Minus one car",
|
|
127
|
-
"0": "No cars",
|
|
128
|
-
"1": "One car",
|
|
129
|
-
">5": "Some cars",
|
|
130
|
-
">19": "Many cars",
|
|
131
|
-
}),
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
} satisfies DeclarationContent;
|
|
248
|
+
// Tells Intlayer to generate message files for i18next
|
|
249
|
+
dictionaryOutput: ["next-intl"],
|
|
135
250
|
|
|
136
|
-
//
|
|
137
|
-
|
|
251
|
+
// The directory where Intlayer will write your message JSON files
|
|
252
|
+
nextIntlMessagesDir: "./i18next/messages",
|
|
253
|
+
},
|
|
254
|
+
};
|
|
138
255
|
```
|
|
139
256
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```javascript
|
|
143
|
-
// src/app/[locale]/page.content.mjs
|
|
257
|
+
```typescript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
258
|
+
import { Locales } from "intlayer";
|
|
144
259
|
|
|
145
|
-
|
|
260
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
261
|
+
const config = {
|
|
262
|
+
/* ... */
|
|
263
|
+
content: {
|
|
264
|
+
// Tells Intlayer to generate message files for i18next
|
|
265
|
+
dictionaryOutput: ["next-intl"],
|
|
146
266
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"key": "page",
|
|
150
|
-
getStarted: {
|
|
151
|
-
main: t({
|
|
152
|
-
en: "Get started by editing",
|
|
153
|
-
fr: "Commencez par éditer",
|
|
154
|
-
es: "Comience por editar",
|
|
155
|
-
}),
|
|
156
|
-
pageLink: "src/app/page.tsx",
|
|
157
|
-
},
|
|
158
|
-
nestedContent: {
|
|
159
|
-
id: "enumeration",
|
|
160
|
-
numberOfCar: enu({
|
|
161
|
-
"<-1": "Less than minus one car",
|
|
162
|
-
"-1": "Minus one car",
|
|
163
|
-
0: "No cars",
|
|
164
|
-
1: "One car",
|
|
165
|
-
">5": "Some cars",
|
|
166
|
-
">19": "Many cars",
|
|
167
|
-
}),
|
|
267
|
+
// The directory where Intlayer will write your message JSON files
|
|
268
|
+
nextIntlMessagesDir: "./i18next/messages",
|
|
168
269
|
},
|
|
169
270
|
};
|
|
170
271
|
|
|
171
|
-
|
|
172
|
-
export default pageContent;
|
|
272
|
+
export default config;
|
|
173
273
|
```
|
|
174
274
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
```javascript
|
|
178
|
-
// src/app/[locale]/page.content.cjs
|
|
275
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
276
|
+
const { Locales } = require("intlayer");
|
|
179
277
|
|
|
180
|
-
|
|
278
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
279
|
+
const config = {
|
|
280
|
+
/* ... */
|
|
281
|
+
content: {
|
|
282
|
+
// Tells Intlayer to generate message files for i18next
|
|
283
|
+
dictionaryOutput: ["next-intl"],
|
|
181
284
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
"key": "page",
|
|
185
|
-
getStarted: {
|
|
186
|
-
main: t({
|
|
187
|
-
en: "Get started by editing",
|
|
188
|
-
fr: "Commencez par éditer",
|
|
189
|
-
es: "Comience por editar",
|
|
190
|
-
}),
|
|
191
|
-
pageLink: "src/app/page.tsx",
|
|
192
|
-
},
|
|
193
|
-
nestedContent: {
|
|
194
|
-
id: "enumeration",
|
|
195
|
-
numberOfCar: enu({
|
|
196
|
-
"<-1": "Less than minus one car",
|
|
197
|
-
"-1": "Minus one car",
|
|
198
|
-
0: "No cars",
|
|
199
|
-
1: "One car",
|
|
200
|
-
">5": "Some cars",
|
|
201
|
-
">19": "Many cars",
|
|
202
|
-
}),
|
|
285
|
+
// The directory where Intlayer will write your message JSON files
|
|
286
|
+
nextIntlMessagesDir: "./intl/messages",
|
|
203
287
|
},
|
|
204
288
|
};
|
|
205
289
|
|
|
206
|
-
|
|
207
|
-
module.exports = pageContent;
|
|
290
|
+
module.exports = config;
|
|
208
291
|
```
|
|
209
292
|
|
|
210
|
-
|
|
293
|
+
> For a complete list of available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/en/configuration.md).
|
|
294
|
+
|
|
295
|
+
Output:
|
|
211
296
|
|
|
212
|
-
```
|
|
213
|
-
|
|
297
|
+
```bash
|
|
298
|
+
.
|
|
299
|
+
└── intl
|
|
300
|
+
└── messages
|
|
301
|
+
├── en
|
|
302
|
+
│ ├── client-component.json
|
|
303
|
+
│ └── server-component.json
|
|
304
|
+
├── es
|
|
305
|
+
│ ├── client-component.json
|
|
306
|
+
│ └── server-component.json
|
|
307
|
+
└── fr
|
|
308
|
+
├── client-component.json
|
|
309
|
+
└── server-component.json
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
For example, the **en/client-component.json** might look like:
|
|
313
|
+
|
|
314
|
+
```json filePath="intlayer/dictionary/en/client-component.json"
|
|
214
315
|
{
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
fr: "Commencez par éditer",
|
|
221
|
-
es: "Comience por editar",
|
|
222
|
-
},
|
|
223
|
-
pageLink: "src/app/page.tsx",
|
|
224
|
-
},
|
|
225
|
-
nestedContent: {
|
|
226
|
-
id: "enumeration",
|
|
227
|
-
nodeType: "enumeration",
|
|
228
|
-
numberOfCar: {
|
|
229
|
-
"<-1": "Less than minus one car",
|
|
230
|
-
"-1": "Minus one car",
|
|
231
|
-
"0": "No cars",
|
|
232
|
-
"1": "One car",
|
|
233
|
-
">5": "Some cars",
|
|
234
|
-
">19": "Many cars",
|
|
235
|
-
},
|
|
236
|
-
},
|
|
316
|
+
"myTranslatedContent": "Hello World",
|
|
317
|
+
"zero_numberOfCar": "No cars",
|
|
318
|
+
"one_numberOfCar": "One car",
|
|
319
|
+
"two_numberOfCar": "Two cars",
|
|
320
|
+
"other_numberOfCar": "Some cars"
|
|
237
321
|
}
|
|
238
322
|
```
|
|
239
323
|
|
|
240
|
-
|
|
324
|
+
## CLI tools
|
|
325
|
+
|
|
326
|
+
Intlayer provides a CLI tool to:
|
|
327
|
+
|
|
328
|
+
- audit your content declarations and complete missing translations
|
|
329
|
+
- build dictionaries from your content declarations
|
|
330
|
+
- push and pull distant dictionaries from your CMS to your locale project
|
|
331
|
+
|
|
332
|
+
Consult [intlayer-cli](https://github.com/aymericzip/intlayer/blob/main/docs/en/intlayer_cli.md) for more information.
|
|
333
|
+
|
|
334
|
+
## Use Intlayer into your application
|
|
335
|
+
|
|
336
|
+
One your content declared, you can consume your Intlayer dictionaries in your application.
|
|
337
|
+
|
|
338
|
+
Intlayer is available as a package for your application.
|
|
339
|
+
|
|
340
|
+
### React Application
|
|
341
|
+
|
|
342
|
+
To use Intlayer in your React application, you can use [react-intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/react-intlayer/index.md).
|
|
343
|
+
|
|
344
|
+
### Next.js Application
|
|
345
|
+
|
|
346
|
+
To use Intlayer in your Next.js application, you can use [next-intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/next-intlayer/index.md).
|
|
347
|
+
|
|
348
|
+
### Express Application
|
|
349
|
+
|
|
350
|
+
To use Intlayer in your Express application, you can use [express-intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/express-intlayer/index.md).
|
|
351
|
+
|
|
352
|
+
## Functions provided by `intlayer` package
|
|
353
|
+
|
|
354
|
+
The `intlayer` package also provides some functions to help you to internationalize your application.
|
|
355
|
+
|
|
356
|
+
- [`getConfiguration()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getConfiguration.md)
|
|
357
|
+
- [`getTranslationContent()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getTranslationContent.md)
|
|
358
|
+
- [`getEnumerationContent()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getEnumerationContent.md)
|
|
359
|
+
- [`getLocaleName()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getLocaleName.md)
|
|
360
|
+
- [`getLocaleLang()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getLocaleLang.md)
|
|
361
|
+
- [`getHTMLTextDir()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getHTMLTextDir.md)
|
|
362
|
+
- [`getPathWithoutLocale()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getPathWithoutLocale.md)
|
|
363
|
+
- [`getMultilingualUrls()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getMultilingualUrls.md)
|
|
364
|
+
- [`getLocalizedUrl()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getLocalizedUrl.md)
|
|
365
|
+
- [`getPathWithoutLocale()`](https://github.com/aymericzip/intlayer/blob/main/docs/en/packages/intlayer/getPathWithoutLocale.md)
|
|
366
|
+
|
|
367
|
+
## Read about Intlayer
|
|
368
|
+
|
|
369
|
+
- [Intlayer Website](https://intlayer.org)
|
|
370
|
+
- [Intlayer Documentation](https://intlayer.org/docs)
|
|
371
|
+
- [Intlayer GitHub](https://github.com/aymericzip/intlayer)
|
|
372
|
+
|
|
373
|
+
- [Ask your questions to our smart documentation](https://intlayer.org/docs/chat)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization in a simple way, through TypeScript, declaration file, declare your multilingual every where in your code.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"./package.json"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@intlayer/
|
|
62
|
-
"@intlayer/
|
|
63
|
-
"@intlayer/
|
|
61
|
+
"@intlayer/config": "4.0.2",
|
|
62
|
+
"@intlayer/core": "^4.0.2",
|
|
63
|
+
"@intlayer/cli": "4.0.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@changesets/changelog-github": "0.5.0",
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
"tsc-alias": "^1.8.10",
|
|
75
75
|
"tsup": "^8.3.5",
|
|
76
76
|
"typescript": "^5.7.3",
|
|
77
|
-
"@utils/eslint-config": "1.0.4",
|
|
78
77
|
"@utils/ts-config": "1.0.4",
|
|
79
78
|
"@utils/ts-config-types": "1.0.4",
|
|
79
|
+
"@utils/eslint-config": "1.0.4",
|
|
80
80
|
"@utils/tsup-config": "1.0.4"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@intlayer/cli": "
|
|
84
|
-
"@intlayer/config": "
|
|
85
|
-
"@intlayer/core": "^
|
|
83
|
+
"@intlayer/cli": "4.0.2",
|
|
84
|
+
"@intlayer/config": "4.0.2",
|
|
85
|
+
"@intlayer/core": "^4.0.2"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=14.18"
|