@intlayer/docs 8.1.8 → 8.1.10
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 +3 -1
- package/docs/ar/dictionary/content_file.md +1 -1
- package/docs/ar/how_works_intlayer.md +1 -1
- package/docs/ar/index.md +1 -1
- package/docs/ar/intlayer_with_astro.md +2 -2
- package/docs/ar/intlayer_with_create_react_app.md +2 -2
- package/docs/ar/intlayer_with_express.md +1 -1
- package/docs/ar/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/ar/intlayer_with_react_native+expo.md +1 -1
- package/docs/ar/intlayer_with_react_router_v7.md +3 -3
- package/docs/ar/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/ar/intlayer_with_vite+solid.md +2 -2
- package/docs/ar/intlayer_with_vite+vue.md +2 -2
- package/docs/ar/introduction.md +1 -1
- package/docs/ar/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/ar/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/ar/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/ar/packages/react-intlayer/useI18n.md +1 -1
- package/docs/ar/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/ar/plugins/sync-json.md +10 -6
- package/docs/ar/releases/v8.md +1 -1
- package/docs/ar/roadmap.md +1 -1
- package/docs/de/dictionary/content_file.md +1 -1
- package/docs/de/how_works_intlayer.md +1 -1
- package/docs/de/index.md +1 -1
- package/docs/de/intlayer_with_astro.md +2 -2
- package/docs/de/intlayer_with_create_react_app.md +2 -2
- package/docs/de/intlayer_with_express.md +1 -1
- package/docs/de/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/de/intlayer_with_react_native+expo.md +1 -1
- package/docs/de/intlayer_with_react_router_v7.md +3 -3
- package/docs/de/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/de/intlayer_with_vite+preact.md +2 -2
- package/docs/de/intlayer_with_vite+solid.md +2 -2
- package/docs/de/intlayer_with_vite+vue.md +2 -2
- package/docs/de/introduction.md +1 -1
- package/docs/de/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/de/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/de/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/de/packages/react-intlayer/useI18n.md +1 -1
- package/docs/de/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/de/plugins/sync-json.md +10 -6
- package/docs/de/releases/v8.md +1 -1
- package/docs/de/roadmap.md +1 -1
- package/docs/en/configuration.md +26 -10
- package/docs/en/dictionary/content_file.md +1 -1
- package/docs/en/releases/v8.md +1 -1
- package/docs/en-GB/dictionary/content_file.md +1 -1
- package/docs/en-GB/how_works_intlayer.md +1 -1
- package/docs/en-GB/index.md +1 -1
- package/docs/en-GB/intlayer_with_astro.md +2 -2
- package/docs/en-GB/intlayer_with_create_react_app.md +3 -3
- package/docs/en-GB/intlayer_with_express.md +1 -1
- package/docs/en-GB/intlayer_with_lynx+react.md +1 -1
- package/docs/en-GB/intlayer_with_nextjs_15.md +2 -2
- package/docs/en-GB/intlayer_with_nextjs_page_router.md +3 -3
- package/docs/en-GB/intlayer_with_react_native+expo.md +1 -1
- package/docs/en-GB/intlayer_with_react_router_v7.md +3 -3
- package/docs/en-GB/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/en-GB/intlayer_with_tanstack.md +3 -3
- package/docs/en-GB/intlayer_with_vite+preact.md +2 -2
- package/docs/en-GB/intlayer_with_vite+solid.md +2 -2
- package/docs/en-GB/intlayer_with_vite+vue.md +2 -2
- package/docs/en-GB/introduction.md +1 -1
- package/docs/en-GB/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/en-GB/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/en-GB/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/en-GB/packages/react-intlayer/useI18n.md +1 -1
- package/docs/en-GB/plugins/sync-json.md +10 -6
- package/docs/en-GB/releases/v8.md +1 -1
- package/docs/en-GB/roadmap.md +1 -1
- package/docs/es/dictionary/content_file.md +1 -1
- package/docs/es/how_works_intlayer.md +1 -1
- package/docs/es/index.md +1 -1
- package/docs/es/intlayer_with_astro.md +2 -2
- package/docs/es/intlayer_with_create_react_app.md +2 -2
- package/docs/es/intlayer_with_express.md +1 -1
- package/docs/es/intlayer_with_lynx+react.md +1 -1
- 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_nextjs_page_router.md +3 -3
- package/docs/es/intlayer_with_react_native+expo.md +1 -1
- package/docs/es/intlayer_with_react_router_v7.md +3 -3
- package/docs/es/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/es/intlayer_with_vite+preact.md +2 -2
- package/docs/es/intlayer_with_vite+solid.md +2 -2
- package/docs/es/intlayer_with_vite+vue.md +2 -2
- package/docs/es/introduction.md +1 -1
- package/docs/es/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/es/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/es/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/es/packages/react-intlayer/useI18n.md +1 -1
- package/docs/es/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/es/plugins/sync-json.md +10 -6
- package/docs/es/releases/v8.md +1 -1
- package/docs/es/roadmap.md +1 -1
- package/docs/fr/dictionary/content_file.md +1 -1
- package/docs/fr/how_works_intlayer.md +1 -1
- package/docs/fr/index.md +1 -1
- package/docs/fr/intlayer_with_astro.md +2 -2
- package/docs/fr/intlayer_with_create_react_app.md +2 -2
- package/docs/fr/intlayer_with_express.md +1 -1
- package/docs/fr/intlayer_with_lynx+react.md +1 -1
- package/docs/fr/intlayer_with_nextjs_14.md +2 -2
- package/docs/fr/intlayer_with_nextjs_15.md +2 -2
- package/docs/fr/intlayer_with_nextjs_page_router.md +3 -3
- package/docs/fr/intlayer_with_react_native+expo.md +1 -1
- package/docs/fr/intlayer_with_react_router_v7.md +3 -3
- package/docs/fr/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/fr/intlayer_with_vite+preact.md +2 -2
- package/docs/fr/intlayer_with_vite+solid.md +2 -2
- package/docs/fr/intlayer_with_vite+vue.md +2 -2
- package/docs/fr/introduction.md +1 -1
- package/docs/fr/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/fr/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/fr/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/fr/packages/react-intlayer/useI18n.md +1 -1
- package/docs/fr/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/fr/plugins/sync-json.md +10 -6
- package/docs/fr/releases/v8.md +1 -1
- package/docs/fr/roadmap.md +1 -1
- package/docs/hi/dictionary/content_file.md +1 -1
- package/docs/hi/how_works_intlayer.md +1 -1
- package/docs/hi/index.md +1 -1
- package/docs/hi/intlayer_with_astro.md +2 -2
- package/docs/hi/intlayer_with_create_react_app.md +2 -2
- package/docs/hi/intlayer_with_express.md +1 -1
- package/docs/hi/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/hi/intlayer_with_react_native+expo.md +1 -1
- package/docs/hi/intlayer_with_react_router_v7.md +3 -3
- package/docs/hi/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/hi/intlayer_with_vite+preact.md +1 -1
- package/docs/hi/intlayer_with_vite+solid.md +1 -1
- package/docs/hi/intlayer_with_vite+vue.md +2 -2
- package/docs/hi/introduction.md +1 -1
- package/docs/hi/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/hi/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/hi/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/hi/packages/react-intlayer/useI18n.md +1 -1
- package/docs/hi/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/hi/plugins/sync-json.md +10 -6
- package/docs/hi/releases/v8.md +1 -1
- package/docs/hi/roadmap.md +1 -1
- package/docs/id/configuration.md +20 -8
- package/docs/id/dictionary/content_file.md +1 -1
- package/docs/id/intlayer_with_vite+preact.md +1 -1
- package/docs/id/plugins/sync-json.md +10 -6
- package/docs/id/releases/v8.md +1 -1
- package/docs/it/dictionary/content_file.md +1 -1
- package/docs/it/how_works_intlayer.md +1 -1
- package/docs/it/index.md +1 -1
- package/docs/it/intlayer_with_astro.md +2 -2
- package/docs/it/intlayer_with_create_react_app.md +2 -2
- package/docs/it/intlayer_with_express.md +1 -1
- package/docs/it/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/it/intlayer_with_react_native+expo.md +1 -1
- package/docs/it/intlayer_with_react_router_v7.md +3 -3
- package/docs/it/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/it/intlayer_with_vite+preact.md +2 -2
- package/docs/it/intlayer_with_vite+solid.md +2 -2
- package/docs/it/intlayer_with_vite+vue.md +2 -2
- package/docs/it/introduction.md +1 -1
- package/docs/it/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/it/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/it/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/it/packages/react-intlayer/useI18n.md +1 -1
- package/docs/it/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/it/plugins/sync-json.md +10 -6
- package/docs/it/releases/v8.md +1 -1
- package/docs/it/roadmap.md +1 -1
- package/docs/ja/dictionary/content_file.md +1 -1
- package/docs/ja/how_works_intlayer.md +1 -1
- package/docs/ja/index.md +1 -1
- package/docs/ja/intlayer_with_astro.md +2 -2
- package/docs/ja/intlayer_with_create_react_app.md +2 -2
- package/docs/ja/intlayer_with_express.md +1 -1
- package/docs/ja/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/ja/intlayer_with_react_native+expo.md +1 -1
- package/docs/ja/intlayer_with_react_router_v7.md +3 -3
- package/docs/ja/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/ja/intlayer_with_vite+preact.md +2 -2
- package/docs/ja/intlayer_with_vite+solid.md +2 -2
- package/docs/ja/intlayer_with_vite+vue.md +2 -2
- package/docs/ja/introduction.md +1 -1
- package/docs/ja/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/ja/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/ja/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/ja/packages/react-intlayer/useI18n.md +1 -1
- package/docs/ja/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/ja/plugins/sync-json.md +10 -6
- package/docs/ja/releases/v8.md +1 -1
- package/docs/ja/roadmap.md +1 -1
- package/docs/ko/dictionary/content_file.md +1 -1
- package/docs/ko/how_works_intlayer.md +1 -1
- package/docs/ko/index.md +1 -1
- package/docs/ko/intlayer_with_astro.md +2 -2
- package/docs/ko/intlayer_with_create_react_app.md +2 -2
- package/docs/ko/intlayer_with_express.md +1 -1
- package/docs/ko/intlayer_with_lynx+react.md +1 -1
- package/docs/ko/intlayer_with_nextjs_14.md +2 -2
- package/docs/ko/intlayer_with_nextjs_15.md +3 -3
- package/docs/ko/intlayer_with_nextjs_page_router.md +3 -3
- package/docs/ko/intlayer_with_react_native+expo.md +1 -1
- package/docs/ko/intlayer_with_react_router_v7.md +3 -3
- package/docs/ko/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/ko/intlayer_with_vite+preact.md +1 -1
- package/docs/ko/intlayer_with_vite+solid.md +2 -2
- package/docs/ko/intlayer_with_vite+vue.md +2 -2
- package/docs/ko/introduction.md +1 -1
- package/docs/ko/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/ko/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/ko/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/ko/packages/react-intlayer/useI18n.md +1 -1
- package/docs/ko/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/ko/plugins/sync-json.md +10 -6
- package/docs/ko/releases/v8.md +1 -1
- package/docs/ko/roadmap.md +1 -1
- package/docs/pl/configuration.md +20 -17
- package/docs/pl/dictionary/content_file.md +1 -1
- package/docs/pl/intlayer_with_tanstack.md +3 -3
- package/docs/pl/plugins/sync-json.md +10 -6
- package/docs/pl/releases/v8.md +1 -1
- package/docs/pt/dictionary/content_file.md +1 -1
- package/docs/pt/how_works_intlayer.md +1 -1
- package/docs/pt/index.md +1 -1
- package/docs/pt/intlayer_with_astro.md +2 -2
- package/docs/pt/intlayer_with_create_react_app.md +2 -2
- package/docs/pt/intlayer_with_express.md +1 -1
- package/docs/pt/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/pt/intlayer_with_react_native+expo.md +1 -1
- package/docs/pt/intlayer_with_react_router_v7.md +3 -3
- package/docs/pt/intlayer_with_tanstack.md +3 -3
- package/docs/pt/intlayer_with_vite+solid.md +2 -2
- package/docs/pt/intlayer_with_vite+vue.md +2 -2
- package/docs/pt/introduction.md +1 -1
- package/docs/pt/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/pt/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/pt/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/pt/packages/react-intlayer/useI18n.md +1 -1
- package/docs/pt/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/pt/plugins/sync-json.md +10 -6
- package/docs/pt/releases/v8.md +1 -1
- package/docs/pt/roadmap.md +1 -1
- package/docs/ru/dictionary/content_file.md +1 -1
- package/docs/ru/how_works_intlayer.md +1 -1
- package/docs/ru/index.md +1 -1
- package/docs/ru/intlayer_with_astro.md +2 -2
- package/docs/ru/intlayer_with_create_react_app.md +2 -2
- package/docs/ru/intlayer_with_express.md +1 -1
- package/docs/ru/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/ru/intlayer_with_react_native+expo.md +1 -1
- package/docs/ru/intlayer_with_react_router_v7.md +3 -3
- package/docs/ru/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/ru/intlayer_with_tanstack.md +3 -3
- package/docs/ru/intlayer_with_vite+solid.md +2 -2
- package/docs/ru/intlayer_with_vite+vue.md +2 -2
- package/docs/ru/introduction.md +1 -1
- package/docs/ru/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/ru/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/ru/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/ru/packages/react-intlayer/useI18n.md +1 -1
- package/docs/ru/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/ru/plugins/sync-json.md +10 -6
- package/docs/ru/releases/v8.md +1 -1
- package/docs/ru/roadmap.md +1 -1
- package/docs/tr/dictionary/content_file.md +1 -1
- package/docs/tr/intlayer_with_astro.md +2 -2
- package/docs/tr/intlayer_with_react_router_v7.md +3 -3
- package/docs/tr/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/tr/intlayer_with_tanstack.md +3 -3
- package/docs/tr/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/tr/packages/next-intlayer/useIntlayer.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/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/tr/plugins/sync-json.md +10 -6
- package/docs/tr/releases/v8.md +1 -1
- package/docs/uk/configuration.md +20 -17
- package/docs/uk/dictionary/content_file.md +1 -1
- package/docs/uk/intlayer_with_tanstack.md +3 -3
- package/docs/uk/releases/v8.md +1 -1
- package/docs/vi/configuration.md +20 -17
- package/docs/vi/dictionary/content_file.md +1 -1
- package/docs/vi/intlayer_with_tanstack.md +3 -3
- package/docs/vi/intlayer_with_vite+preact.md +1 -1
- package/docs/vi/plugins/sync-json.md +10 -6
- package/docs/vi/releases/v8.md +1 -1
- package/docs/zh/dictionary/content_file.md +1 -1
- package/docs/zh/how_works_intlayer.md +1 -1
- package/docs/zh/index.md +1 -1
- package/docs/zh/intlayer_with_astro.md +2 -2
- package/docs/zh/intlayer_with_create_react_app.md +2 -2
- package/docs/zh/intlayer_with_express.md +1 -1
- package/docs/zh/intlayer_with_lynx+react.md +1 -1
- 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 +3 -3
- package/docs/zh/intlayer_with_react_native+expo.md +1 -1
- package/docs/zh/intlayer_with_react_router_v7.md +3 -3
- package/docs/zh/intlayer_with_react_router_v7_fs_routes.md +3 -3
- package/docs/zh/intlayer_with_tanstack.md +1 -1
- package/docs/zh/intlayer_with_vite+solid.md +2 -2
- package/docs/zh/intlayer_with_vite+vue.md +2 -2
- package/docs/zh/introduction.md +1 -1
- package/docs/zh/packages/next-intlayer/useDictionary.md +1 -1
- package/docs/zh/packages/next-intlayer/useIntlayer.md +1 -1
- package/docs/zh/packages/react-intlayer/useDictionary.md +1 -1
- package/docs/zh/packages/react-intlayer/useI18n.md +1 -1
- package/docs/zh/packages/react-intlayer/useIntlayer.md +1 -1
- package/docs/zh/plugins/sync-json.md +10 -6
- package/docs/zh/releases/v8.md +1 -1
- package/docs/zh/roadmap.md +1 -1
- package/package.json +7 -7
package/docs/uk/configuration.md
CHANGED
|
@@ -735,8 +735,9 @@ export default config;
|
|
|
735
735
|
**Базова конфігурація (за замовчуванням)**:
|
|
736
736
|
|
|
737
737
|
```typescript
|
|
738
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
738
739
|
// intlayer.config.ts
|
|
739
|
-
|
|
740
|
+
const config: IntlayerConfig = {
|
|
740
741
|
internationalization: {
|
|
741
742
|
locales: ["en", "fr", "es"],
|
|
742
743
|
defaultLocale: "en",
|
|
@@ -745,16 +746,18 @@ export default defineConfig({
|
|
|
745
746
|
mode: "prefix-no-default",
|
|
746
747
|
storage: "localStorage",
|
|
747
748
|
headerName: "x-intlayer-locale",
|
|
748
|
-
basePath: "",
|
|
749
749
|
},
|
|
750
|
-
}
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
export default config;
|
|
751
753
|
```
|
|
752
754
|
|
|
753
755
|
**Конфігурація, сумісна з GDPR**:
|
|
754
756
|
|
|
755
757
|
```typescript
|
|
758
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
756
759
|
// intlayer.config.ts
|
|
757
|
-
|
|
760
|
+
const config: IntlayerConfig = {
|
|
758
761
|
internationalization: {
|
|
759
762
|
locales: ["en", "fr", "es"],
|
|
760
763
|
defaultLocale: "en",
|
|
@@ -774,35 +777,36 @@ export default defineConfig({
|
|
|
774
777
|
httpOnly: false,
|
|
775
778
|
},
|
|
776
779
|
],
|
|
777
|
-
headerName: "x-intlayer-locale",
|
|
778
|
-
basePath: "",
|
|
779
780
|
},
|
|
780
|
-
}
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
export default config;
|
|
781
784
|
```
|
|
782
785
|
|
|
783
786
|
**Режим параметрів пошуку**:
|
|
784
787
|
|
|
785
788
|
```typescript
|
|
789
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
786
790
|
// intlayer.config.ts
|
|
787
|
-
|
|
791
|
+
const config: IntlayerConfig = {
|
|
788
792
|
internationalization: {
|
|
789
793
|
locales: ["en", "fr", "es"],
|
|
790
794
|
defaultLocale: "en",
|
|
791
795
|
},
|
|
792
796
|
routing: {
|
|
793
797
|
mode: "search-params",
|
|
794
|
-
storage: "localStorage",
|
|
795
|
-
headerName: "x-intlayer-locale",
|
|
796
|
-
basePath: "",
|
|
797
798
|
},
|
|
798
|
-
}
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
export default config;
|
|
799
802
|
```
|
|
800
803
|
|
|
801
804
|
**Режим без префікса з кастомним сховищем**:
|
|
802
805
|
|
|
803
806
|
```typescript
|
|
807
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
804
808
|
// intlayer.config.ts
|
|
805
|
-
|
|
809
|
+
const config: IntlayerConfig = {
|
|
806
810
|
internationalization: {
|
|
807
811
|
locales: ["en", "fr", "es"],
|
|
808
812
|
defaultLocale: "en",
|
|
@@ -811,12 +815,11 @@ export default defineConfig({
|
|
|
811
815
|
mode: "no-prefix",
|
|
812
816
|
storage: {
|
|
813
817
|
type: "sessionStorage",
|
|
814
|
-
name: "app-locale",
|
|
815
818
|
},
|
|
816
|
-
headerName: "x-custom-locale",
|
|
817
|
-
basePath: "/my-app",
|
|
818
819
|
},
|
|
819
|
-
}
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
export default config;
|
|
820
823
|
```
|
|
821
824
|
|
|
822
825
|
---
|
|
@@ -489,7 +489,7 @@ const aboutPageMetaContent = {
|
|
|
489
489
|
title: "About Our Company - Learn More About Us",
|
|
490
490
|
description: "Discover our company's mission, values, and team.",
|
|
491
491
|
},
|
|
492
|
-
} satisfies Dictionary
|
|
492
|
+
} satisfies Dictionary;
|
|
493
493
|
|
|
494
494
|
export default aboutPageMetaContent;
|
|
495
495
|
```
|
|
@@ -121,7 +121,7 @@ bunx intlayer init
|
|
|
121
121
|
|
|
122
122
|
- **intlayer**
|
|
123
123
|
|
|
124
|
-
Основний пакет, який надає інструменти інтернаціоналізації для керування конфігурацією, перекладу, [оголошення контенту](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/
|
|
124
|
+
Основний пакет, який надає інструменти інтернаціоналізації для керування конфігурацією, перекладу, [оголошення контенту](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/content_file.md), транспіляції та [команд CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/cli/index.md).
|
|
125
125
|
|
|
126
126
|
- **react-intlayer**
|
|
127
127
|
Пакет, який інтегрує Intlayer із React-застосунком. Надає провайдери контексту та хуки для інтернаціоналізації в React.
|
|
@@ -302,7 +302,7 @@ export default appContent;
|
|
|
302
302
|
|
|
303
303
|
> Оголошення вмісту можна визначати будь-де у вашому застосунку, за умови, що вони включені у директорію `contentDir` (за замовчуванням, `./app`) та відповідають розширенню файлу декларації вмісту (за замовчуванням, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
304
304
|
|
|
305
|
-
> Для детальнішої інформації зверніться до [документації з оголошення вмісту](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/
|
|
305
|
+
> Для детальнішої інформації зверніться до [документації з оголошення вмісту](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/content_file.md).
|
|
306
306
|
|
|
307
307
|
### Крок 8: Створіть компоненти та хуки, що враховують локаль
|
|
308
308
|
|
|
@@ -794,5 +794,5 @@ Intlayer використовує module augmentation, щоб отримати
|
|
|
794
794
|
- [Документація Tanstack Start](https://reactrouter.com/)
|
|
795
795
|
- [Хук useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/packages/react-intlayer/useIntlayer.md)
|
|
796
796
|
- [Хук useLocale](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/packages/react-intlayer/useLocale.md)
|
|
797
|
-
- [Оголошення контенту](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/
|
|
797
|
+
- [Оголошення контенту](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/dictionary/content_file.md)
|
|
798
798
|
- [Конфігурація](https://github.com/aymericzip/intlayer/blob/main/docs/docs/uk/configuration.md)
|
package/docs/uk/releases/v8.md
CHANGED
|
@@ -787,7 +787,7 @@ const aboutPageMetaContent = {
|
|
|
787
787
|
title: "About Our Company - Learn More About Us",
|
|
788
788
|
description: "Discover our company's mission, values, and team.",
|
|
789
789
|
},
|
|
790
|
-
} satisfies Dictionary
|
|
790
|
+
} satisfies Dictionary;
|
|
791
791
|
|
|
792
792
|
export default aboutPageMetaContent;
|
|
793
793
|
```
|
package/docs/vi/configuration.md
CHANGED
|
@@ -735,8 +735,9 @@ Dưới đây là một số ví dụ cấu hình phổ biến cho cấu trúc r
|
|
|
735
735
|
**Cấu hình cơ bản (Mặc định)**:
|
|
736
736
|
|
|
737
737
|
```typescript
|
|
738
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
738
739
|
// intlayer.config.ts
|
|
739
|
-
|
|
740
|
+
const config: IntlayerConfig = {
|
|
740
741
|
internationalization: {
|
|
741
742
|
locales: ["en", "fr", "es"],
|
|
742
743
|
defaultLocale: "en",
|
|
@@ -745,16 +746,18 @@ export default defineConfig({
|
|
|
745
746
|
mode: "prefix-no-default",
|
|
746
747
|
storage: "localStorage",
|
|
747
748
|
headerName: "x-intlayer-locale",
|
|
748
|
-
basePath: "",
|
|
749
749
|
},
|
|
750
|
-
}
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
export default config;
|
|
751
753
|
```
|
|
752
754
|
|
|
753
755
|
**Cấu hình tuân thủ GDPR**:
|
|
754
756
|
|
|
755
757
|
```typescript
|
|
758
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
756
759
|
// intlayer.config.ts
|
|
757
|
-
|
|
760
|
+
const config: IntlayerConfig = {
|
|
758
761
|
internationalization: {
|
|
759
762
|
locales: ["en", "fr", "es"],
|
|
760
763
|
defaultLocale: "en",
|
|
@@ -774,35 +777,36 @@ export default defineConfig({
|
|
|
774
777
|
httpOnly: false,
|
|
775
778
|
},
|
|
776
779
|
],
|
|
777
|
-
headerName: "x-intlayer-locale",
|
|
778
|
-
basePath: "",
|
|
779
780
|
},
|
|
780
|
-
}
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
export default config;
|
|
781
784
|
```
|
|
782
785
|
|
|
783
786
|
**Chế độ Tham số Tìm kiếm**:
|
|
784
787
|
|
|
785
788
|
```typescript
|
|
789
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
786
790
|
// intlayer.config.ts
|
|
787
|
-
|
|
791
|
+
const config: IntlayerConfig = {
|
|
788
792
|
internationalization: {
|
|
789
793
|
locales: ["en", "fr", "es"],
|
|
790
794
|
defaultLocale: "en",
|
|
791
795
|
},
|
|
792
796
|
routing: {
|
|
793
797
|
mode: "search-params",
|
|
794
|
-
storage: "localStorage",
|
|
795
|
-
headerName: "x-intlayer-locale",
|
|
796
|
-
basePath: "",
|
|
797
798
|
},
|
|
798
|
-
}
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
export default config;
|
|
799
802
|
```
|
|
800
803
|
|
|
801
804
|
**Chế độ Không Tiền Tố với Bộ Lưu Trữ Tùy Chỉnh**:
|
|
802
805
|
|
|
803
806
|
```typescript
|
|
807
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
804
808
|
// intlayer.config.ts
|
|
805
|
-
|
|
809
|
+
const config: IntlayerConfig = {
|
|
806
810
|
internationalization: {
|
|
807
811
|
locales: ["en", "fr", "es"],
|
|
808
812
|
defaultLocale: "en",
|
|
@@ -811,12 +815,11 @@ export default defineConfig({
|
|
|
811
815
|
mode: "no-prefix",
|
|
812
816
|
storage: {
|
|
813
817
|
type: "sessionStorage",
|
|
814
|
-
name: "app-locale",
|
|
815
818
|
},
|
|
816
|
-
headerName: "x-custom-locale",
|
|
817
|
-
basePath: "/my-app",
|
|
818
819
|
},
|
|
819
|
-
}
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
export default config;
|
|
820
823
|
```
|
|
821
824
|
|
|
822
825
|
---
|
|
@@ -485,7 +485,7 @@ const aboutPageMetaContent = {
|
|
|
485
485
|
title: "About Our Company - Learn More About Us",
|
|
486
486
|
description: "Discover our company's mission, values, and team.",
|
|
487
487
|
},
|
|
488
|
-
} satisfies Dictionary
|
|
488
|
+
} satisfies Dictionary;
|
|
489
489
|
|
|
490
490
|
export default aboutPageMetaContent;
|
|
491
491
|
```
|
|
@@ -121,7 +121,7 @@ bunx intlayer init
|
|
|
121
121
|
|
|
122
122
|
- **intlayer**
|
|
123
123
|
|
|
124
|
-
Gói cốt lõi cung cấp các công cụ quốc tế hóa cho quản lý cấu hình, dịch thuật, [khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/
|
|
124
|
+
Gói cốt lõi cung cấp các công cụ quốc tế hóa cho quản lý cấu hình, dịch thuật, [khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md), biên dịch lại, và [các lệnh CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/intlayer_cli.md).
|
|
125
125
|
|
|
126
126
|
- **react-intlayer**
|
|
127
127
|
Gói tích hợp Intlayer với ứng dụng React. Nó cung cấp các context provider và hook cho việc quốc tế hóa trong React.
|
|
@@ -302,7 +302,7 @@ export default appContent;
|
|
|
302
302
|
|
|
303
303
|
> Các khai báo nội dung của bạn có thể được định nghĩa ở bất kỳ đâu trong ứng dụng của bạn miễn là chúng được bao gồm trong thư mục `contentDir` (mặc định là `./app`). Và phù hợp với phần mở rộng tệp khai báo nội dung (mặc định là `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
304
304
|
|
|
305
|
-
> Để biết thêm chi tiết, hãy tham khảo [tài liệu khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/
|
|
305
|
+
> Để biết thêm chi tiết, hãy tham khảo [tài liệu khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md).
|
|
306
306
|
|
|
307
307
|
### Bước 8: Tạo các Component và Hook nhận biết Locale
|
|
308
308
|
|
|
@@ -794,5 +794,5 @@ Tiện ích mở rộng này cung cấp:
|
|
|
794
794
|
- [Tanstack Start Tài liệu](https://reactrouter.com/)
|
|
795
795
|
- [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/react-intlayer/useIntlayer.md)
|
|
796
796
|
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/packages/react-intlayer/useLocale.md)
|
|
797
|
-
- [Khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/
|
|
797
|
+
- [Khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md)
|
|
798
798
|
- [Cấu hình](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/configuration.md)
|
|
@@ -428,7 +428,7 @@ module.exports = appContent;
|
|
|
428
428
|
|
|
429
429
|
> Các khai báo nội dung của bạn có thể được định nghĩa ở bất kỳ đâu trong ứng dụng của bạn miễn là chúng được đưa vào thư mục `contentDir` (mặc định là `./src`). Và phải phù hợp với phần mở rộng của file khai báo nội dung (mặc định là `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
430
430
|
|
|
431
|
-
> Để biết thêm chi tiết, hãy tham khảo [tài liệu khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/
|
|
431
|
+
> Để biết thêm chi tiết, hãy tham khảo [tài liệu khai báo nội dung](https://github.com/aymericzip/intlayer/blob/main/docs/docs/vi/dictionary/content_file.md).
|
|
432
432
|
|
|
433
433
|
> Nếu file nội dung của bạn bao gồm mã TSX, bạn có thể cần import `import { h } from "preact";` hoặc đảm bảo pragma JSX của bạn được thiết lập đúng cho Preact.
|
|
434
434
|
|
|
@@ -66,10 +66,10 @@ npm i -D @intlayer/sync-json-plugin
|
|
|
66
66
|
Thêm plugin vào `intlayer.config.ts` của bạn và trỏ nó đến cấu trúc JSON hiện có của bạn.
|
|
67
67
|
|
|
68
68
|
```ts fileName="intlayer.config.ts"
|
|
69
|
-
import {
|
|
69
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
70
70
|
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
const config: IntlayerConfig = {
|
|
73
73
|
internationalization: {
|
|
74
74
|
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
75
75
|
defaultLocale: Locales.ENGLISH,
|
|
@@ -82,7 +82,9 @@ export default defineConfig({
|
|
|
82
82
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
83
83
|
}),
|
|
84
84
|
],
|
|
85
|
-
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default config;
|
|
86
88
|
```
|
|
87
89
|
|
|
88
90
|
Phương án thay thế: một tệp duy nhất cho mỗi locale (thường dùng với i18next/react-intl):
|
|
@@ -147,10 +149,10 @@ Khi nhiều plugin cùng nhắm tới cùng một khóa từ điển, tham số
|
|
|
147
149
|
- Các plugin có cùng mức ưu tiên sẽ được xử lý theo thứ tự xuất hiện trong cấu hình
|
|
148
150
|
|
|
149
151
|
```ts fileName="intlayer.config.ts"
|
|
150
|
-
import {
|
|
152
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
151
153
|
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
152
154
|
|
|
153
|
-
|
|
155
|
+
const config: IntlayerConfig = {
|
|
154
156
|
internationalization: {
|
|
155
157
|
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
156
158
|
defaultLocale: Locales.ENGLISH,
|
|
@@ -181,7 +183,9 @@ export default defineConfig({
|
|
|
181
183
|
priority: 1,
|
|
182
184
|
}),
|
|
183
185
|
],
|
|
184
|
-
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export default config;
|
|
185
189
|
```
|
|
186
190
|
|
|
187
191
|
### Giải quyết xung đột
|
package/docs/vi/releases/v8.md
CHANGED
|
@@ -787,7 +787,7 @@ const aboutPageMetaContent = {
|
|
|
787
787
|
title: "About Our Company - Learn More About Us",
|
|
788
788
|
description: "Discover our company's mission, values, and team.",
|
|
789
789
|
},
|
|
790
|
-
} satisfies Dictionary
|
|
790
|
+
} satisfies Dictionary;
|
|
791
791
|
|
|
792
792
|
export default aboutPageMetaContent;
|
|
793
793
|
```
|
|
@@ -501,7 +501,7 @@ const aboutPageMetaContent = {
|
|
|
501
501
|
title: "About Our Company - Learn More About Us",
|
|
502
502
|
description: "Discover our company's mission, values, and team.",
|
|
503
503
|
},
|
|
504
|
-
} satisfies Dictionary
|
|
504
|
+
} satisfies Dictionary;
|
|
505
505
|
|
|
506
506
|
export default aboutPageMetaContent;
|
|
507
507
|
```
|
|
@@ -78,7 +78,7 @@ const MyComponent = () => {
|
|
|
78
78
|
|
|
79
79
|
此钩子将为您管理语言环境检测,并返回当前语言环境的内容。通过此钩子,您还可以解释 markdown、管理复数化等。
|
|
80
80
|
|
|
81
|
-
> 要查看 Intlayer 的所有功能,您可以阅读 [字典文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
81
|
+
> 要查看 Intlayer 的所有功能,您可以阅读 [字典文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
82
82
|
|
|
83
83
|
## 远程内容
|
|
84
84
|
|
package/docs/zh/index.md
CHANGED
|
@@ -55,7 +55,7 @@ Intlayer 提供了一种灵活且现代化的应用翻译方案。我们的文
|
|
|
55
55
|
|
|
56
56
|
将您的多语言内容组织在代码附近,保持所有内容的一致性和可维护性。
|
|
57
57
|
|
|
58
|
-
- **[入门指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
58
|
+
- **[入门指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)**
|
|
59
59
|
学习在 Intlayer 中声明内容的基础知识。
|
|
60
60
|
|
|
61
61
|
- **[翻译](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/translation.md)**
|
|
@@ -67,7 +67,7 @@ yarn add react react-dom react-intlayer @astrojs/react
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
- **intlayer**
|
|
70
|
-
核心包,提供国际化工具,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
70
|
+
核心包,提供国际化工具,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译以及[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)。
|
|
71
71
|
|
|
72
72
|
- **astro-intlayer**
|
|
73
73
|
包括用于将 Intlayer 与 [Vite 打包工具](https://vite.dev/guide/why.html#why-bundle-for-production) 集成的 Astro 集成插件,以及用于检测用户首选语言环境、管理 Cookie 和处理 URL 重定向的中间件。
|
|
@@ -138,7 +138,7 @@ export default appContent;
|
|
|
138
138
|
|
|
139
139
|
> 您的内容声明可以定义在应用程序中的任何位置,只要它们被包含在 `contentDir` 目录中(默认是 `./src`)。并且文件扩展名需匹配内容声明文件扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
140
140
|
|
|
141
|
-
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
141
|
+
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
142
142
|
|
|
143
143
|
### 第5步:在 Astro 中使用您的内容
|
|
144
144
|
|
|
@@ -68,7 +68,7 @@ bunx intlayer init
|
|
|
68
68
|
|
|
69
69
|
- **intlayer**
|
|
70
70
|
|
|
71
|
-
提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
71
|
+
提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译和 [CLI 命令](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md) 的核心包。
|
|
72
72
|
|
|
73
73
|
- **react-intlayer**
|
|
74
74
|
|
|
@@ -284,7 +284,7 @@ module.exports = appContent;
|
|
|
284
284
|
|
|
285
285
|
> 您的内容声明可以在应用程序中的任何位置定义,只要它们包含在 `contentDir` 目录中(默认情况下为 `./src`),并且文件扩展名符合内容声明的要求(默认情况下为 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
286
286
|
|
|
287
|
-
> 有关更多详细信息,请参阅 [内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
287
|
+
> 有关更多详细信息,请参阅 [内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
288
288
|
|
|
289
289
|
> 如果您的内容文件包含 TSX 代码,您应该考虑在内容文件中导入 `import React from "react";`。
|
|
290
290
|
|
|
@@ -223,7 +223,7 @@ module.exports = indexContent;
|
|
|
223
223
|
|
|
224
224
|
> 您可以在应用程序中的任何位置定义内容声明,只要它们包含在 `contentDir` 目录中(默认是 `./src`),并且文件扩展名符合内容声明格式(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
225
225
|
|
|
226
|
-
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
226
|
+
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
227
227
|
|
|
228
228
|
### Express 应用程序设置
|
|
229
229
|
|
|
@@ -368,7 +368,7 @@ module.exports = appContent;
|
|
|
368
368
|
}
|
|
369
369
|
```
|
|
370
370
|
|
|
371
|
-
> 有关内容声明的详细信息,请参阅 [Intlayer 的内容文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
371
|
+
> 有关内容声明的详细信息,请参阅 [Intlayer 的内容文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
372
372
|
|
|
373
373
|
---
|
|
374
374
|
|
|
@@ -73,7 +73,7 @@ bunx intlayer init
|
|
|
73
73
|
|
|
74
74
|
- **intlayer**
|
|
75
75
|
|
|
76
|
-
核心包,提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
76
|
+
核心包,提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译和[CLI命令](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)的国际化工具。
|
|
77
77
|
|
|
78
78
|
- **next-intlayer**
|
|
79
79
|
|
|
@@ -432,7 +432,7 @@ module.exports = pageContent;
|
|
|
432
432
|
"en": "src/app/page.tsx",
|
|
433
433
|
> 您的内容声明可以在应用程序中的任何位置定义,只要它们被包含在 `contentDir` 目录中(默认是 `./src`),并且符合内容声明文件的扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
434
434
|
|
|
435
|
-
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
435
|
+
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
436
436
|
|
|
437
437
|
### 第7步:在代码中使用内容
|
|
438
438
|
|
|
@@ -76,7 +76,7 @@ bunx intlayer init
|
|
|
76
76
|
|
|
77
77
|
- **intlayer**
|
|
78
78
|
|
|
79
|
-
核心包,提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
79
|
+
核心包,提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译和[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)的国际化工具。
|
|
80
80
|
|
|
81
81
|
- **next-intlayer**
|
|
82
82
|
|
|
@@ -427,7 +427,7 @@ module.exports = pageContent;
|
|
|
427
427
|
|
|
428
428
|
> 您的内容声明可以在应用程序中的任何位置定义,只要它们被包含在 `contentDir` 目录中(默认是 `./src`)。并且文件扩展名需匹配内容声明文件扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
429
429
|
|
|
430
|
-
> 更多详情,请参考[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
430
|
+
> 更多详情,请参考[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
431
431
|
|
|
432
432
|
### 第6步:在代码中使用内容
|
|
433
433
|
|
|
@@ -70,7 +70,7 @@ bunx intlayer init
|
|
|
70
70
|
|
|
71
71
|
- **intlayer**
|
|
72
72
|
|
|
73
|
-
核心包,提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
73
|
+
核心包,提供用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译和[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)的国际化工具。
|
|
74
74
|
|
|
75
75
|
- **next-intlayer**
|
|
76
76
|
|
|
@@ -442,7 +442,7 @@ module.exports = homeContent;
|
|
|
442
442
|
}
|
|
443
443
|
```
|
|
444
444
|
|
|
445
|
-
有关声明内容的更多信息,请参阅[内容声明指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
445
|
+
有关声明内容的更多信息,请参阅[内容声明指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
446
446
|
|
|
447
447
|
### 第7步:在代码中使用内容
|
|
448
448
|
|
|
@@ -1486,7 +1486,7 @@ Intlayer 使用模块增强(module augmentation)来利用 TypeScript 的优
|
|
|
1486
1486
|
## 其他资源
|
|
1487
1487
|
|
|
1488
1488
|
- **Intlayer 文档:** [GitHub 仓库](https://github.com/aymericzip/intlayer)
|
|
1489
|
-
- **词典指南:** [词典](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
1489
|
+
- **词典指南:** [词典](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)
|
|
1490
1490
|
- **配置文档:** [配置指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
|
|
1491
1491
|
|
|
1492
1492
|
通过遵循本指南,您可以将 Intlayer 有效集成到使用页面路由的 Next.js 应用程序中,为您的 Web 项目提供强大且可扩展的国际化支持。
|
|
@@ -370,7 +370,7 @@ module.exports = appContent;
|
|
|
370
370
|
}
|
|
371
371
|
```
|
|
372
372
|
|
|
373
|
-
> 有关内容声明的详细信息,请参阅 [Intlayer 内容文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
373
|
+
> 有关内容声明的详细信息,请参阅 [Intlayer 内容文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
374
374
|
|
|
375
375
|
---
|
|
376
376
|
|
|
@@ -90,7 +90,7 @@ bunx intlayer init
|
|
|
90
90
|
|
|
91
91
|
- **intlayer**
|
|
92
92
|
|
|
93
|
-
提供国际化工具的核心包,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
93
|
+
提供国际化工具的核心包,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译以及[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)。
|
|
94
94
|
|
|
95
95
|
- **react-intlayer**
|
|
96
96
|
将 Intlayer 集成到 React 应用中的包。它提供了 React 国际化的上下文提供者和钩子。
|
|
@@ -291,7 +291,7 @@ export default pageContent;
|
|
|
291
291
|
|
|
292
292
|
> 您的内容声明可以定义在应用程序中的任何位置,只要它们被包含在 `contentDir` 目录中(默认是 `./app`)。并且文件扩展名需匹配内容声明文件扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
293
293
|
|
|
294
|
-
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
294
|
+
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
295
295
|
|
|
296
296
|
### 第7步:创建支持多语言的组件
|
|
297
297
|
|
|
@@ -586,7 +586,7 @@ Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库
|
|
|
586
586
|
- [React Router v7 文档](https://reactrouter.com/)
|
|
587
587
|
- [useIntlayer 钩子](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/react-intlayer/useIntlayer.md)
|
|
588
588
|
- [useLocale 钩子](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/react-intlayer/useLocale.md)
|
|
589
|
-
- [内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
589
|
+
- [内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)
|
|
590
590
|
- [配置](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
|
|
591
591
|
|
|
592
592
|
本综合指南提供了将 Intlayer 与 React Router v7 集成所需的一切,支持完全国际化的应用程序,具备基于区域设置的路由和 TypeScript 支持。
|
|
@@ -89,7 +89,7 @@ bunx intlayer init
|
|
|
89
89
|
|
|
90
90
|
- **intlayer**
|
|
91
91
|
|
|
92
|
-
提供国际化工具的核心包,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
92
|
+
提供国际化工具的核心包,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译以及[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)。
|
|
93
93
|
|
|
94
94
|
- **react-intlayer**
|
|
95
95
|
将 Intlayer 集成到 React 应用中的包。它提供了 React 国际化的上下文提供者和钩子。
|
|
@@ -261,7 +261,7 @@ export default pageContent;
|
|
|
261
261
|
|
|
262
262
|
> 您的内容声明可以定义在应用程序中的任何位置,只要它们被包含在 `contentDir` 目录中(默认是 `./app`)。并且文件扩展名需匹配内容声明文件扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
263
263
|
|
|
264
|
-
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
264
|
+
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
265
265
|
|
|
266
266
|
### 第7步:创建支持多语言的组件
|
|
267
267
|
|
|
@@ -531,7 +531,7 @@ Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库
|
|
|
531
531
|
- [React Router v7 文档](https://reactrouter.com/)
|
|
532
532
|
- [useIntlayer 钩子](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/react-intlayer/useIntlayer.md)
|
|
533
533
|
- [useLocale 钩子](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/react-intlayer/useLocale.md)
|
|
534
|
-
- [内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
534
|
+
- [内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)
|
|
535
535
|
- [配置](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
|
|
536
536
|
|
|
537
537
|
本综合指南提供了将 Intlayer 与 React Router v7 集成所需的一切,支持完全国际化的应用程序,具备基于区域设置的路由和 TypeScript 支持。
|
|
@@ -798,5 +798,5 @@ Intlayer 使用模块增强来利用 TypeScript 的优势,使您的代码库
|
|
|
798
798
|
- [Tanstack Start 文档](https://reactrouter.com/)
|
|
799
799
|
- [useIntlayer 钩子](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/react-intlayer/useIntlayer.md)
|
|
800
800
|
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/packages/react-intlayer/useLocale.md)
|
|
801
|
-
- [内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
801
|
+
- [内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)
|
|
802
802
|
- [配置](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/configuration.md)
|
|
@@ -103,7 +103,7 @@ bunx intlayer init
|
|
|
103
103
|
- **intlayer**
|
|
104
104
|
|
|
105
105
|
- **intlayer**
|
|
106
|
-
提供国际化工具的核心包,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
106
|
+
提供国际化工具的核心包,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译以及[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)。
|
|
107
107
|
|
|
108
108
|
- **solid-intlayer**
|
|
109
109
|
将 Intlayer 集成到 Solid 应用中的包。它提供了 Solid 国际化的上下文提供者和钩子。
|
|
@@ -263,7 +263,7 @@ module.exports = appContent;
|
|
|
263
263
|
|
|
264
264
|
> 您的内容声明可以在应用程序中的任何位置定义,只要它们被包含在 `contentDir` 目录中(默认是 `./src`)。并且文件扩展名需匹配内容声明文件扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
265
265
|
|
|
266
|
-
> 更多详情,请参考[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
266
|
+
> 更多详情,请参考[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
267
267
|
|
|
268
268
|
### 第5步:在代码中使用 Intlayer
|
|
269
269
|
|
|
@@ -95,7 +95,7 @@ bunx intlayer init
|
|
|
95
95
|
|
|
96
96
|
- **intlayer**
|
|
97
97
|
|
|
98
|
-
核心包,提供国际化工具,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
98
|
+
核心包,提供国际化工具,用于配置管理、翻译、[内容声明](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)、转译以及[命令行工具](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_cli.md)。
|
|
99
99
|
|
|
100
100
|
- **vue-intlayer**
|
|
101
101
|
将 Intlayer 集成到 Vue 应用中的包,提供 Vue 国际化的上下文提供者和组合式函数。
|
|
@@ -426,7 +426,7 @@ module.exports = appContent;
|
|
|
426
426
|
|
|
427
427
|
> 您的内容声明可以定义在应用程序中的任何位置,只要它们被包含在 `contentDir` 目录中(默认是 `./src`)。并且文件扩展名需匹配内容声明的文件扩展名(默认是 `.content.{json,ts,tsx,js,jsx,mjs,cjs}`)。
|
|
428
428
|
|
|
429
|
-
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
429
|
+
> 更多详情,请参阅[内容声明文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)。
|
|
430
430
|
|
|
431
431
|
### 第5步:在代码中使用 Intlayer
|
|
432
432
|
|
package/docs/zh/introduction.md
CHANGED
|
@@ -157,7 +157,7 @@ Intlayer 提供了多种功能,专为满足现代网页开发的需求而设
|
|
|
157
157
|
|
|
158
158
|
将您的多语言内容组织在代码附近,保持内容一致且易于维护。
|
|
159
159
|
|
|
160
|
-
- **[入门指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/
|
|
160
|
+
- **[入门指南](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/content_file.md)**
|
|
161
161
|
学习在 Intlayer 中声明内容的基础知识。
|
|
162
162
|
|
|
163
163
|
- **[翻译](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/translation.md)**
|