@intlayer/docs 6.1.6-canary.0 → 6.1.6
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/en/next-i18next_vs_next-intl_vs_intlayer.md +71 -80
- package/dist/cjs/generated/docs.entry.cjs +16 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +16 -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/intlayer_with_angular.md +2 -2
- package/docs/ar/intlayer_with_astro.md +246 -0
- package/docs/ar/intlayer_with_create_react_app.md +3 -2
- package/docs/ar/intlayer_with_express.md +2 -2
- package/docs/ar/intlayer_with_nestjs.md +2 -2
- package/docs/ar/intlayer_with_nextjs_14.md +2 -2
- package/docs/ar/intlayer_with_nextjs_15.md +2 -2
- package/docs/ar/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ar/intlayer_with_nuxt.md +2 -2
- package/docs/ar/intlayer_with_react_native+expo.md +11 -20
- package/docs/ar/intlayer_with_react_router_v7.md +195 -241
- package/docs/ar/intlayer_with_tanstack.md +198 -272
- package/docs/ar/intlayer_with_vite+preact.md +9 -9
- package/docs/ar/intlayer_with_vite+react.md +7 -7
- package/docs/ar/intlayer_with_vite+vue.md +9 -9
- package/docs/de/intlayer_with_angular.md +2 -2
- package/docs/de/intlayer_with_astro.md +246 -0
- package/docs/de/intlayer_with_create_react_app.md +2 -2
- package/docs/de/intlayer_with_express.md +2 -2
- package/docs/de/intlayer_with_nestjs.md +2 -2
- package/docs/de/intlayer_with_nextjs_14.md +2 -2
- package/docs/de/intlayer_with_nextjs_15.md +2 -2
- package/docs/de/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/de/intlayer_with_nuxt.md +2 -2
- package/docs/de/intlayer_with_react_native+expo.md +11 -20
- package/docs/de/intlayer_with_react_router_v7.md +193 -242
- package/docs/de/intlayer_with_tanstack.md +194 -266
- package/docs/de/intlayer_with_vite+preact.md +9 -9
- package/docs/de/intlayer_with_vite+react.md +9 -9
- package/docs/de/intlayer_with_vite+vue.md +11 -11
- package/docs/de/packages/vite-intlayer/index.md +3 -3
- package/docs/en/how_works_intlayer.md +1 -1
- package/docs/en/index.md +1 -1
- package/docs/en/intlayer_cli.md +1 -1
- package/docs/en/intlayer_with_angular.md +4 -4
- package/docs/en/intlayer_with_astro.md +246 -0
- package/docs/en/intlayer_with_create_react_app.md +4 -4
- package/docs/en/intlayer_with_express.md +3 -3
- package/docs/en/intlayer_with_lynx+react.md +1 -1
- package/docs/en/intlayer_with_nestjs.md +2 -2
- package/docs/en/intlayer_with_nextjs_14.md +13 -4
- package/docs/en/intlayer_with_nextjs_15.md +13 -4
- package/docs/en/intlayer_with_nextjs_page_router.md +5 -5
- package/docs/en/intlayer_with_nuxt.md +4 -4
- package/docs/en/intlayer_with_react_native+expo.md +46 -24
- package/docs/en/intlayer_with_react_router_v7.md +164 -211
- package/docs/en/intlayer_with_tanstack.md +166 -241
- package/docs/en/intlayer_with_vite+preact.md +12 -12
- package/docs/en/intlayer_with_vite+react.md +12 -12
- package/docs/en/intlayer_with_vite+solid.md +2 -2
- package/docs/en/intlayer_with_vite+svelte.md +2 -2
- package/docs/en/intlayer_with_vite+vue.md +12 -12
- package/docs/en/introduction.md +1 -1
- package/docs/en/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/en/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/en/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/en/packages/react-intlayer/useI18n.md +1 -1
- package/docs/en/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/en/releases/v6.md +1 -0
- package/docs/en/roadmap.md +1 -1
- package/docs/en-GB/intlayer_with_angular.md +3 -3
- package/docs/en-GB/intlayer_with_astro.md +246 -0
- package/docs/en-GB/intlayer_with_create_react_app.md +5 -4
- package/docs/en-GB/intlayer_with_express.md +2 -2
- package/docs/en-GB/intlayer_with_nestjs.md +2 -2
- package/docs/en-GB/intlayer_with_nextjs_14.md +4 -4
- package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/en-GB/intlayer_with_nuxt.md +2 -2
- package/docs/en-GB/intlayer_with_react_native+expo.md +11 -20
- package/docs/en-GB/intlayer_with_react_router_v7.md +171 -220
- package/docs/en-GB/intlayer_with_tanstack.md +174 -248
- package/docs/en-GB/intlayer_with_vite+preact.md +9 -9
- package/docs/en-GB/intlayer_with_vite+react.md +9 -9
- package/docs/en-GB/intlayer_with_vite+vue.md +11 -11
- package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/en-GB/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/es/intlayer_with_angular.md +2 -2
- package/docs/es/intlayer_with_astro.md +246 -0
- package/docs/es/intlayer_with_create_react_app.md +3 -2
- package/docs/es/intlayer_with_express.md +2 -2
- package/docs/es/intlayer_with_nextjs_14.md +2 -2
- package/docs/es/intlayer_with_nextjs_15.md +2 -2
- package/docs/es/intlayer_with_react_native+expo.md +11 -20
- package/docs/es/intlayer_with_react_router_v7.md +188 -232
- package/docs/es/intlayer_with_tanstack.md +203 -273
- package/docs/es/intlayer_with_vite+preact.md +7 -7
- package/docs/es/intlayer_with_vite+react.md +7 -7
- package/docs/es/intlayer_with_vite+vue.md +9 -9
- package/docs/fr/intlayer_with_angular.md +2 -2
- package/docs/fr/intlayer_with_astro.md +246 -0
- package/docs/fr/intlayer_with_create_react_app.md +3 -2
- package/docs/fr/intlayer_with_express.md +2 -2
- package/docs/fr/intlayer_with_nestjs.md +2 -2
- package/docs/fr/intlayer_with_nextjs_14.md +2 -2
- package/docs/fr/intlayer_with_react_native+expo.md +11 -20
- package/docs/fr/intlayer_with_react_router_v7.md +188 -248
- package/docs/fr/intlayer_with_tanstack.md +192 -265
- package/docs/fr/intlayer_with_vite+preact.md +7 -7
- package/docs/fr/intlayer_with_vite+react.md +7 -7
- package/docs/fr/intlayer_with_vite+vue.md +9 -9
- package/docs/hi/intlayer_cli.md +1 -4
- package/docs/hi/intlayer_with_angular.md +2 -2
- package/docs/hi/intlayer_with_astro.md +246 -0
- package/docs/hi/intlayer_with_create_react_app.md +2 -2
- package/docs/hi/intlayer_with_express.md +2 -2
- package/docs/hi/intlayer_with_nestjs.md +2 -2
- package/docs/hi/intlayer_with_nextjs_14.md +2 -2
- package/docs/hi/intlayer_with_nextjs_15.md +2 -2
- package/docs/hi/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/hi/intlayer_with_nuxt.md +2 -2
- package/docs/hi/intlayer_with_react_native+expo.md +11 -20
- package/docs/hi/intlayer_with_react_router_v7.md +199 -243
- package/docs/hi/intlayer_with_tanstack.md +210 -285
- package/docs/hi/intlayer_with_vite+preact.md +9 -9
- package/docs/hi/intlayer_with_vite+react.md +9 -9
- package/docs/hi/intlayer_with_vite+solid.md +1 -1
- package/docs/hi/intlayer_with_vite+vue.md +11 -11
- package/docs/it/intlayer_with_angular.md +2 -2
- package/docs/it/intlayer_with_astro.md +246 -0
- package/docs/it/intlayer_with_create_react_app.md +3 -2
- package/docs/it/intlayer_with_express.md +2 -2
- package/docs/it/intlayer_with_nestjs.md +2 -2
- package/docs/it/intlayer_with_nextjs_14.md +2 -2
- package/docs/it/intlayer_with_nextjs_15.md +2 -2
- package/docs/it/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/it/intlayer_with_nuxt.md +2 -2
- package/docs/it/intlayer_with_react_native+expo.md +11 -21
- package/docs/it/intlayer_with_react_router_v7.md +195 -242
- package/docs/it/intlayer_with_tanstack.md +203 -267
- package/docs/it/intlayer_with_vite+preact.md +9 -9
- package/docs/it/intlayer_with_vite+react.md +13 -11
- package/docs/it/intlayer_with_vite+vue.md +11 -11
- package/docs/ja/intlayer_with_angular.md +2 -2
- package/docs/ja/intlayer_with_astro.md +246 -0
- package/docs/ja/intlayer_with_create_react_app.md +3 -2
- package/docs/ja/intlayer_with_express.md +2 -2
- package/docs/ja/intlayer_with_nestjs.md +2 -2
- package/docs/ja/intlayer_with_nextjs_14.md +2 -2
- package/docs/ja/intlayer_with_nextjs_15.md +2 -2
- package/docs/ja/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ja/intlayer_with_nuxt.md +2 -2
- package/docs/ja/intlayer_with_react_native+expo.md +18 -29
- package/docs/ja/intlayer_with_react_router_v7.md +204 -250
- package/docs/ja/intlayer_with_tanstack.md +218 -286
- package/docs/ja/intlayer_with_vite+preact.md +9 -9
- package/docs/ja/intlayer_with_vite+react.md +11 -11
- package/docs/ja/intlayer_with_vite+vue.md +11 -11
- package/docs/ko/intlayer_with_angular.md +2 -2
- package/docs/ko/intlayer_with_astro.md +246 -0
- package/docs/ko/intlayer_with_create_react_app.md +3 -2
- package/docs/ko/intlayer_with_express.md +2 -2
- package/docs/ko/intlayer_with_nestjs.md +2 -2
- package/docs/ko/intlayer_with_nextjs_14.md +2 -2
- package/docs/ko/intlayer_with_nextjs_15.md +2 -2
- package/docs/ko/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ko/intlayer_with_nuxt.md +2 -2
- package/docs/ko/intlayer_with_react_native+expo.md +19 -28
- package/docs/ko/intlayer_with_react_router_v7.md +190 -244
- package/docs/ko/intlayer_with_tanstack.md +200 -270
- package/docs/ko/intlayer_with_vite+preact.md +9 -9
- package/docs/ko/intlayer_with_vite+react.md +9 -9
- package/docs/ko/intlayer_with_vite+vue.md +11 -11
- package/docs/pt/intlayer_with_angular.md +2 -2
- package/docs/pt/intlayer_with_astro.md +246 -0
- package/docs/pt/intlayer_with_create_react_app.md +3 -2
- package/docs/pt/intlayer_with_express.md +2 -2
- package/docs/pt/intlayer_with_nestjs.md +2 -2
- package/docs/pt/intlayer_with_nextjs_14.md +2 -2
- package/docs/pt/intlayer_with_nextjs_15.md +2 -2
- package/docs/pt/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/pt/intlayer_with_nuxt.md +2 -2
- package/docs/pt/intlayer_with_react_native+expo.md +11 -20
- package/docs/pt/intlayer_with_react_router_v7.md +7 -13
- package/docs/pt/intlayer_with_tanstack.md +183 -258
- package/docs/pt/intlayer_with_vite+preact.md +9 -9
- package/docs/pt/intlayer_with_vite+react.md +9 -9
- package/docs/pt/intlayer_with_vite+vue.md +9 -9
- package/docs/ru/intlayer_with_angular.md +2 -2
- package/docs/ru/intlayer_with_astro.md +246 -0
- package/docs/ru/intlayer_with_create_react_app.md +3 -2
- package/docs/ru/intlayer_with_express.md +2 -2
- package/docs/ru/intlayer_with_nestjs.md +2 -2
- package/docs/ru/intlayer_with_nextjs_14.md +2 -2
- package/docs/ru/intlayer_with_nextjs_15.md +2 -2
- package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ru/intlayer_with_nuxt.md +2 -2
- package/docs/ru/intlayer_with_react_native+expo.md +11 -20
- package/docs/ru/intlayer_with_react_router_v7.md +192 -238
- package/docs/ru/intlayer_with_tanstack.md +197 -269
- package/docs/ru/intlayer_with_vite+preact.md +9 -9
- package/docs/ru/intlayer_with_vite+react.md +9 -9
- package/docs/ru/intlayer_with_vite+vue.md +11 -11
- package/docs/tr/how_works_intlayer.md +1 -1
- package/docs/tr/index.md +1 -1
- package/docs/tr/intlayer_cli.md +1 -1
- package/docs/tr/intlayer_with_angular.md +4 -4
- package/docs/tr/intlayer_with_astro.md +246 -0
- package/docs/tr/intlayer_with_create_react_app.md +4 -4
- package/docs/tr/intlayer_with_express.md +3 -3
- package/docs/tr/intlayer_with_lynx+react.md +1 -1
- package/docs/tr/intlayer_with_nestjs.md +2 -2
- package/docs/tr/intlayer_with_nextjs_14.md +2 -2
- package/docs/tr/intlayer_with_nextjs_15.md +4 -4
- package/docs/tr/intlayer_with_nextjs_page_router.md +5 -5
- package/docs/tr/intlayer_with_nuxt.md +4 -4
- package/docs/tr/intlayer_with_react_native+expo.md +12 -21
- package/docs/tr/intlayer_with_react_router_v7.md +222 -267
- package/docs/tr/intlayer_with_tanstack.md +400 -303
- package/docs/tr/intlayer_with_vite+preact.md +12 -12
- package/docs/tr/intlayer_with_vite+react.md +12 -12
- package/docs/tr/intlayer_with_vite+solid.md +2 -2
- package/docs/tr/intlayer_with_vite+svelte.md +2 -2
- package/docs/tr/intlayer_with_vite+vue.md +12 -12
- package/docs/tr/introduction.md +1 -1
- package/docs/tr/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/tr/packages/react-intlayer/useI18n.md +1 -1
- package/docs/tr/roadmap.md +1 -1
- package/docs/zh/intlayer_with_angular.md +2 -2
- package/docs/zh/intlayer_with_astro.md +246 -0
- package/docs/zh/intlayer_with_create_react_app.md +3 -2
- package/docs/zh/intlayer_with_express.md +2 -2
- package/docs/zh/intlayer_with_nestjs.md +2 -2
- package/docs/zh/intlayer_with_nextjs_14.md +2 -2
- package/docs/zh/intlayer_with_nextjs_15.md +2 -2
- package/docs/zh/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/zh/intlayer_with_nuxt.md +2 -2
- package/docs/zh/intlayer_with_react_native+expo.md +19 -28
- package/docs/zh/intlayer_with_react_router_v7.md +200 -248
- package/docs/zh/intlayer_with_tanstack.md +208 -283
- package/docs/zh/intlayer_with_vite+preact.md +9 -9
- package/docs/zh/intlayer_with_vite+react.md +9 -9
- package/docs/zh/intlayer_with_vite+vue.md +9 -9
- package/package.json +11 -11
- package/src/generated/docs.entry.ts +16 -0
|
@@ -1108,38 +1108,38 @@ const App = () => (
|
|
|
1108
1108
|
module.exports = App;
|
|
1109
1109
|
```
|
|
1110
1110
|
|
|
1111
|
-
同时,您还可以使用 `
|
|
1111
|
+
同时,您还可以使用 `intlayerMiddleware` 为您的应用程序添加服务器端路由。该插件将根据 URL 自动检测当前语言环境并设置相应的语言环境 Cookie。如果未指定语言环境,插件将根据用户浏览器的语言偏好确定最合适的语言环境。如果仍未检测到语言环境,则会重定向到默认语言环境。
|
|
1112
1112
|
|
|
1113
1113
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1114
1114
|
import { defineConfig } from "vite";
|
|
1115
1115
|
import preact from "@preact/preset-vite";
|
|
1116
|
-
import { intlayer,
|
|
1116
|
+
import { intlayer, intlayerMiddleware } from "vite-intlayer";
|
|
1117
1117
|
|
|
1118
1118
|
// https://vitejs.dev/config/
|
|
1119
1119
|
export default defineConfig({
|
|
1120
|
-
plugins: [preact(), intlayer(),
|
|
1120
|
+
plugins: [preact(), intlayer(), intlayerMiddleware()],
|
|
1121
1121
|
});
|
|
1122
1122
|
```
|
|
1123
1123
|
|
|
1124
1124
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
1125
1125
|
import { defineConfig } from "vite";
|
|
1126
1126
|
import preact from "@preact/preset-vite";
|
|
1127
|
-
import { intlayer,
|
|
1127
|
+
import { intlayer, intlayerMiddleware } from "vite-intlayer";
|
|
1128
1128
|
|
|
1129
1129
|
// https://vitejs.dev/config/
|
|
1130
1130
|
export default defineConfig({
|
|
1131
|
-
plugins: [preact(), intlayer(),
|
|
1131
|
+
plugins: [preact(), intlayer(), intlayerMiddleware()],
|
|
1132
1132
|
});
|
|
1133
1133
|
```
|
|
1134
1134
|
|
|
1135
1135
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
1136
1136
|
const { defineConfig } = require("vite");
|
|
1137
1137
|
const preact = require("@preact/preset-vite");
|
|
1138
|
-
const { intlayer,
|
|
1138
|
+
const { intlayer, intlayerMiddleware } = require("vite-intlayer");
|
|
1139
1139
|
|
|
1140
1140
|
// https://vitejs.dev/config/
|
|
1141
1141
|
module.exports = defineConfig({
|
|
1142
|
-
plugins: [preact(), intlayer(),
|
|
1142
|
+
plugins: [preact(), intlayer(), intlayerMiddleware()],
|
|
1143
1143
|
});
|
|
1144
1144
|
```
|
|
1145
1145
|
|
|
@@ -1676,9 +1676,9 @@ module.exports = { LocalizedLink, checkIsExternalLink };
|
|
|
1676
1676
|
|
|
1677
1677
|
Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库更健壮。
|
|
1678
1678
|
|
|
1679
|
-

|
|
1680
1680
|
|
|
1681
|
-

|
|
1682
1682
|
|
|
1683
1683
|
确保您的 TypeScript 配置包含自动生成的类型。
|
|
1684
1684
|
|
|
@@ -1003,38 +1003,38 @@ const App = () => (
|
|
|
1003
1003
|
);
|
|
1004
1004
|
```
|
|
1005
1005
|
|
|
1006
|
-
同时,您还可以使用 `
|
|
1006
|
+
同时,您还可以使用 `intlayerMiddleware` 为您的应用程序添加服务器端路由。该插件将根据 URL 自动检测当前语言环境并设置相应的语言环境 Cookie。如果未指定语言环境,插件将根据用户浏览器的语言偏好确定最合适的语言环境。如果未检测到任何语言环境,它将重定向到默认语言环境。
|
|
1007
1007
|
|
|
1008
1008
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
1009
1009
|
import { defineConfig } from "vite";
|
|
1010
1010
|
import react from "@vitejs/plugin-react-swc";
|
|
1011
|
-
import { intlayer,
|
|
1011
|
+
import { intlayer, intlayerMiddleware } from "vite-intlayer";
|
|
1012
1012
|
|
|
1013
1013
|
// https://vitejs.dev/config/
|
|
1014
1014
|
export default defineConfig({
|
|
1015
|
-
plugins: [react(), intlayer(),
|
|
1015
|
+
plugins: [react(), intlayer(), intlayerMiddleware()],
|
|
1016
1016
|
});
|
|
1017
1017
|
```
|
|
1018
1018
|
|
|
1019
1019
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
1020
1020
|
import { defineConfig } from "vite";
|
|
1021
1021
|
import react from "@vitejs/plugin-react-swc";
|
|
1022
|
-
import { intlayer,
|
|
1022
|
+
import { intlayer, intlayerMiddleware } from "vite-intlayer";
|
|
1023
1023
|
|
|
1024
1024
|
// https://vitejs.dev/config/
|
|
1025
1025
|
export default defineConfig({
|
|
1026
|
-
plugins: [react(), intlayer(),
|
|
1026
|
+
plugins: [react(), intlayer(), intlayerMiddleware()],
|
|
1027
1027
|
});
|
|
1028
1028
|
```
|
|
1029
1029
|
|
|
1030
1030
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
1031
1031
|
const { defineConfig } = require("vite");
|
|
1032
1032
|
const react = require("@vitejs/plugin-react-swc");
|
|
1033
|
-
const { intlayer,
|
|
1033
|
+
const { intlayer, intlayerMiddleware } = require("vite-intlayer");
|
|
1034
1034
|
|
|
1035
1035
|
// https://vitejs.dev/config/
|
|
1036
1036
|
module.exports = defineConfig({
|
|
1037
|
-
plugins: [react(), intlayer(),
|
|
1037
|
+
plugins: [react(), intlayer(), intlayerMiddleware()],
|
|
1038
1038
|
});
|
|
1039
1039
|
```
|
|
1040
1040
|
|
|
@@ -1619,9 +1619,9 @@ Link.displayName = "Link";
|
|
|
1619
1619
|
|
|
1620
1620
|
Intlayer 使用模块增强(module augmentation)来利用 TypeScript 的优势,使您的代码库更健壮。
|
|
1621
1621
|
|
|
1622
|
-

|
|
1623
1623
|
|
|
1624
|
-

|
|
1625
1625
|
|
|
1626
1626
|
确保您的 TypeScript 配置包含自动生成的类型。
|
|
1627
1627
|
|
|
@@ -677,38 +677,38 @@ import LocaleSwitcher from "@components/LocaleSwitcher.vue";
|
|
|
677
677
|
</template>
|
|
678
678
|
```
|
|
679
679
|
|
|
680
|
-
同时,你也可以使用 `
|
|
680
|
+
同时,你也可以使用 `intlayerMiddleware` 为你的应用添加服务器端路由。该插件会根据 URL 自动检测当前语言环境并设置相应的语言环境 cookie。如果未指定语言环境,插件将根据用户浏览器的语言偏好确定最合适的语言环境。如果仍未检测到语言环境,则会重定向到默认语言环境。
|
|
681
681
|
|
|
682
682
|
```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
|
|
683
683
|
import { defineConfig } from "vite";
|
|
684
684
|
import vue from "@vitejs/plugin-vue";
|
|
685
|
-
import { intlayer,
|
|
685
|
+
import { intlayer, intlayerMiddleware } from "vite-intlayer";
|
|
686
686
|
|
|
687
687
|
// https://vitejs.dev/config/
|
|
688
688
|
export default defineConfig({
|
|
689
|
-
plugins: [vue(), intlayer(),
|
|
689
|
+
plugins: [vue(), intlayer(), intlayerMiddleware()],
|
|
690
690
|
});
|
|
691
691
|
```
|
|
692
692
|
|
|
693
693
|
```javascript {3,7} fileName="vite.config.mjs" codeFormat="esm"
|
|
694
694
|
import { defineConfig } from "vite";
|
|
695
695
|
import vue from "@vitejs/plugin-vue";
|
|
696
|
-
import { intlayer,
|
|
696
|
+
import { intlayer, intlayerMiddleware } from "vite-intlayer";
|
|
697
697
|
|
|
698
698
|
// https://vitejs.dev/config/
|
|
699
699
|
export default defineConfig({
|
|
700
|
-
plugins: [vue(), intlayer(),
|
|
700
|
+
plugins: [vue(), intlayer(), intlayerMiddleware()],
|
|
701
701
|
});
|
|
702
702
|
```
|
|
703
703
|
|
|
704
704
|
```javascript {3,7} fileName="vite.config.cjs" codeFormat="commonjs"
|
|
705
705
|
const { defineConfig } = require("vite");
|
|
706
706
|
const vue = require("@vitejs/plugin-vue");
|
|
707
|
-
const { intlayer,
|
|
707
|
+
const { intlayer, intlayerMiddleware } = require("vite-intlayer");
|
|
708
708
|
|
|
709
709
|
// https://vitejs.dev/config/
|
|
710
710
|
module.exports = defineConfig({
|
|
711
|
-
plugins: [vue(), intlayer(),
|
|
711
|
+
plugins: [vue(), intlayer(), intlayerMiddleware()],
|
|
712
712
|
});
|
|
713
713
|
```
|
|
714
714
|
|
|
@@ -1012,9 +1012,9 @@ const { myMarkdownContent } = useIntlayer("my-component");
|
|
|
1012
1012
|
|
|
1013
1013
|
Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库更强大。
|
|
1014
1014
|
|
|
1015
|
-

|
|
1016
1016
|
|
|
1017
|
-

|
|
1018
1018
|
|
|
1019
1019
|
确保您的 TypeScript 配置包含自动生成的类型。
|
|
1020
1020
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/docs",
|
|
3
|
-
"version": "6.1.6
|
|
3
|
+
"version": "6.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer documentation",
|
|
6
6
|
"keywords": [
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"legal"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@intlayer/config": "6.1.6
|
|
52
|
-
"@intlayer/core": "6.1.6
|
|
51
|
+
"@intlayer/config": "6.1.6",
|
|
52
|
+
"@intlayer/core": "6.1.6"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^24.5.2",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"tsx": "^4.20.5",
|
|
64
64
|
"typescript": "^5.9.2",
|
|
65
65
|
"vitest": "^3.2.4",
|
|
66
|
-
"@intlayer/api": "6.1.6
|
|
67
|
-
"@intlayer/cli": "6.1.6-canary.0",
|
|
68
|
-
"@utils/ts-config-types": "1.0.4",
|
|
66
|
+
"@intlayer/api": "6.1.6",
|
|
69
67
|
"@utils/ts-config": "1.0.4",
|
|
70
|
-
"@utils/
|
|
68
|
+
"@utils/ts-config-types": "1.0.4",
|
|
69
|
+
"@utils/tsup-config": "1.0.4",
|
|
70
|
+
"@intlayer/cli": "6.1.6"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@intlayer/
|
|
74
|
-
"@intlayer/
|
|
75
|
-
"@intlayer/
|
|
76
|
-
"@intlayer/
|
|
73
|
+
"@intlayer/core": "6.1.6",
|
|
74
|
+
"@intlayer/api": "6.1.6",
|
|
75
|
+
"@intlayer/cli": "6.1.6",
|
|
76
|
+
"@intlayer/config": "6.1.6"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|
|
79
79
|
"node": ">=14.18"
|
|
@@ -380,6 +380,22 @@ export const docsEntry = {
|
|
|
380
380
|
hi: readLocale('intlayer_with_angular.md', 'hi'),
|
|
381
381
|
tr: readLocale('intlayer_with_angular.md', 'tr'),
|
|
382
382
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
383
|
+
'./docs/en/intlayer_with_astro.md': {
|
|
384
|
+
en: readLocale('intlayer_with_astro.md', 'en'),
|
|
385
|
+
fr: readLocale('intlayer_with_astro.md', 'fr'),
|
|
386
|
+
ru: readLocale('intlayer_with_astro.md', 'ru'),
|
|
387
|
+
ja: readLocale('intlayer_with_astro.md', 'ja'),
|
|
388
|
+
ko: readLocale('intlayer_with_astro.md', 'ko'),
|
|
389
|
+
zh: readLocale('intlayer_with_astro.md', 'zh'),
|
|
390
|
+
es: readLocale('intlayer_with_astro.md', 'es'),
|
|
391
|
+
de: readLocale('intlayer_with_astro.md', 'de'),
|
|
392
|
+
ar: readLocale('intlayer_with_astro.md', 'ar'),
|
|
393
|
+
pt: readLocale('intlayer_with_astro.md', 'pt'),
|
|
394
|
+
'en-GB': readLocale('intlayer_with_astro.md', 'en-GB'),
|
|
395
|
+
it: readLocale('intlayer_with_astro.md', 'it'),
|
|
396
|
+
hi: readLocale('intlayer_with_astro.md', 'hi'),
|
|
397
|
+
tr: readLocale('intlayer_with_astro.md', 'tr'),
|
|
398
|
+
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
383
399
|
'./docs/en/intlayer_with_create_react_app.md': {
|
|
384
400
|
en: readLocale('intlayer_with_create_react_app.md', 'en'),
|
|
385
401
|
fr: readLocale('intlayer_with_create_react_app.md', 'fr'),
|