@intlayer/docs 8.1.9 → 8.1.11
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/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_compiler.md +1 -3
- package/docs/ar/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/de/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.md +1 -1
- package/docs/en/configuration.md +26 -10
- package/docs/en/intlayer_with_nextjs_compiler.md +1 -3
- package/docs/en/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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_compiler.md +1 -3
- package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/es/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/fr/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/hi/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.md +1 -1
- package/docs/id/configuration.md +20 -8
- package/docs/id/intlayer_with_nextjs_compiler.md +1 -3
- package/docs/id/intlayer_with_nextjs_no_locale_path.md +2 -6
- package/docs/id/intlayer_with_vite+preact.md +1 -1
- package/docs/id/plugins/sync-json.md +10 -6
- 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_compiler.md +1 -3
- package/docs/it/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/ja/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/ko/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.md +1 -1
- package/docs/pl/configuration.md +20 -17
- package/docs/pl/intlayer_with_nextjs_compiler.md +1 -3
- package/docs/pl/intlayer_with_nextjs_no_locale_path.md +2 -6
- package/docs/pl/intlayer_with_tanstack.md +3 -3
- package/docs/pl/plugins/sync-json.md +10 -6
- 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_compiler.md +1 -3
- package/docs/pt/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.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_compiler.md +1 -3
- package/docs/ru/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.md +1 -1
- package/docs/tr/intlayer_with_astro.md +2 -2
- package/docs/tr/intlayer_with_nextjs_compiler.md +1 -3
- package/docs/tr/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/uk/configuration.md +20 -17
- package/docs/uk/intlayer_with_nextjs_compiler.md +1 -3
- package/docs/uk/intlayer_with_nextjs_no_locale_path.md +2 -6
- package/docs/uk/intlayer_with_tanstack.md +3 -3
- package/docs/vi/configuration.md +20 -17
- package/docs/vi/intlayer_with_nextjs_compiler.md +1 -3
- package/docs/vi/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/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_compiler.md +1 -3
- package/docs/zh/intlayer_with_nextjs_no_locale_path.md +2 -6
- 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/roadmap.md +1 -1
- package/package.json +7 -7
|
@@ -66,10 +66,10 @@ npm i -D @intlayer/sync-json-plugin
|
|
|
66
66
|
플러그인을 `intlayer.config.ts`에 추가하고 기존 JSON 구조를 가리키도록 설정하세요.
|
|
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
|
대안: 로케일별 단일 파일 (i18next/react-intl 설정에서 일반적임):
|
|
@@ -147,10 +149,10 @@ syncJSON({
|
|
|
147
149
|
- 동일한 우선순위를 가진 플러그인은 구성에 나타나는 순서대로 처리됩니다.
|
|
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
|
### 충돌 해결
|
package/docs/ko/roadmap.md
CHANGED
|
@@ -39,7 +39,7 @@ Intlayer는 애플리케이션 전반에서 콘텐츠를 선언, 관리 및 업
|
|
|
39
39
|
|
|
40
40
|
> 참고 자료:
|
|
41
41
|
>
|
|
42
|
-
> - [콘텐츠 선언](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/
|
|
42
|
+
> - [콘텐츠 선언](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/content_file.md)
|
|
43
43
|
|
|
44
44
|
### 2. 국제화
|
|
45
45
|
|
package/docs/pl/configuration.md
CHANGED
|
@@ -732,8 +732,9 @@ Oto kilka typowych przykładów konfiguracji dla nowej struktury routingu w wers
|
|
|
732
732
|
**Podstawowa konfiguracja (domyślna)**:
|
|
733
733
|
|
|
734
734
|
```typescript
|
|
735
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
735
736
|
// intlayer.config.ts
|
|
736
|
-
|
|
737
|
+
const config: IntlayerConfig = {
|
|
737
738
|
internationalization: {
|
|
738
739
|
locales: ["en", "fr", "es"],
|
|
739
740
|
defaultLocale: "en",
|
|
@@ -742,16 +743,18 @@ export default defineConfig({
|
|
|
742
743
|
mode: "prefix-no-default",
|
|
743
744
|
storage: "localStorage",
|
|
744
745
|
headerName: "x-intlayer-locale",
|
|
745
|
-
basePath: "",
|
|
746
746
|
},
|
|
747
|
-
}
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
export default config;
|
|
748
750
|
```
|
|
749
751
|
|
|
750
752
|
**Konfiguracja zgodna z RODO**:
|
|
751
753
|
|
|
752
754
|
```typescript
|
|
755
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
753
756
|
// intlayer.config.ts
|
|
754
|
-
|
|
757
|
+
const config: IntlayerConfig = {
|
|
755
758
|
internationalization: {
|
|
756
759
|
locales: ["en", "fr", "es"],
|
|
757
760
|
defaultLocale: "en",
|
|
@@ -771,35 +774,36 @@ export default defineConfig({
|
|
|
771
774
|
httpOnly: false,
|
|
772
775
|
},
|
|
773
776
|
],
|
|
774
|
-
headerName: "x-intlayer-locale",
|
|
775
|
-
basePath: "",
|
|
776
777
|
},
|
|
777
|
-
}
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
export default config;
|
|
778
781
|
```
|
|
779
782
|
|
|
780
783
|
**Tryb parametrów wyszukiwania**:
|
|
781
784
|
|
|
782
785
|
```typescript
|
|
786
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
783
787
|
// intlayer.config.ts
|
|
784
|
-
|
|
788
|
+
const config: IntlayerConfig = {
|
|
785
789
|
internationalization: {
|
|
786
790
|
locales: ["en", "fr", "es"],
|
|
787
791
|
defaultLocale: "en",
|
|
788
792
|
},
|
|
789
793
|
routing: {
|
|
790
794
|
mode: "search-params",
|
|
791
|
-
storage: "localStorage",
|
|
792
|
-
headerName: "x-intlayer-locale",
|
|
793
|
-
basePath: "",
|
|
794
795
|
},
|
|
795
|
-
}
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
export default config;
|
|
796
799
|
```
|
|
797
800
|
|
|
798
801
|
**Tryb bez prefiksu z niestandardową pamięcią**:
|
|
799
802
|
|
|
800
803
|
```typescript
|
|
804
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
801
805
|
// intlayer.config.ts
|
|
802
|
-
|
|
806
|
+
const config: IntlayerConfig = {
|
|
803
807
|
internationalization: {
|
|
804
808
|
locales: ["en", "fr", "es"],
|
|
805
809
|
defaultLocale: "en",
|
|
@@ -808,12 +812,11 @@ export default defineConfig({
|
|
|
808
812
|
mode: "no-prefix",
|
|
809
813
|
storage: {
|
|
810
814
|
type: "sessionStorage",
|
|
811
|
-
name: "app-locale",
|
|
812
815
|
},
|
|
813
|
-
headerName: "x-custom-locale",
|
|
814
|
-
basePath: "/my-app",
|
|
815
816
|
},
|
|
816
|
-
}
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
export default config;
|
|
817
820
|
```
|
|
818
821
|
|
|
819
822
|
---
|
|
@@ -379,9 +379,7 @@ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
|
|
|
379
379
|
import { useLocale } from "next-intlayer";
|
|
380
380
|
|
|
381
381
|
export const LocaleSwitcher: FC = () => {
|
|
382
|
-
const { locale, availableLocales, setLocale } = useLocale(
|
|
383
|
-
onChange: () => window.location.reload(),
|
|
384
|
-
});
|
|
382
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
385
383
|
|
|
386
384
|
return (
|
|
387
385
|
<div>
|
|
@@ -879,9 +879,7 @@ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
|
|
|
879
879
|
import { useLocale } from "next-intlayer";
|
|
880
880
|
|
|
881
881
|
export const LocaleSwitcher: FC = () => {
|
|
882
|
-
const { locale, availableLocales, setLocale } = useLocale(
|
|
883
|
-
onChange: () => window.location.reload(),
|
|
884
|
-
});
|
|
882
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
885
883
|
|
|
886
884
|
return (
|
|
887
885
|
<div>
|
|
@@ -924,9 +922,7 @@ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
|
|
|
924
922
|
import { useLocale } from "next-intlayer";
|
|
925
923
|
|
|
926
924
|
export const LocaleSwitcher = () => {
|
|
927
|
-
const { locale, availableLocales, setLocale } = useLocale(
|
|
928
|
-
onChange: () => window.location.reload(),
|
|
929
|
-
});
|
|
925
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
930
926
|
|
|
931
927
|
return (
|
|
932
928
|
<div>
|
|
@@ -121,7 +121,7 @@ bunx intlayer init
|
|
|
121
121
|
|
|
122
122
|
- **intlayer**
|
|
123
123
|
|
|
124
|
-
Podstawowy pakiet, który dostarcza narzędzia do internacjonalizacji dla zarządzania konfiguracją, tłumaczeń, [deklaracji treści](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dictionary/
|
|
124
|
+
Podstawowy pakiet, który dostarcza narzędzia do internacjonalizacji dla zarządzania konfiguracją, tłumaczeń, [deklaracji treści](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dictionary/content_file.md), transpiliacji oraz [poleceń CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_cli.md).
|
|
125
125
|
|
|
126
126
|
- **react-intlayer**
|
|
127
127
|
Pakiet integrujący Intlayer z aplikacją React. Zapewnia dostawców kontekstu oraz hooki do internacjonalizacji w React.
|
|
@@ -302,7 +302,7 @@ export default appContent;
|
|
|
302
302
|
|
|
303
303
|
> Twoje deklaracje zawartości mogą być definiowane w dowolnym miejscu w Twojej aplikacji, pod warunkiem, że zostaną umieszczone w katalogu `contentDir` (domyślnie `./app`). I będą miały rozszerzenie pliku deklaracji zawartości (domyślnie `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
304
304
|
|
|
305
|
-
> Po więcej szczegółów odsyłamy do [dokumentacji deklaracji zawartości](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dictionary/
|
|
305
|
+
> Po więcej szczegółów odsyłamy do [dokumentacji deklaracji zawartości](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dictionary/content_file.md).
|
|
306
306
|
|
|
307
307
|
### Krok 8: Tworzenie komponentów i hooków uwzględniających lokalizację
|
|
308
308
|
|
|
@@ -794,5 +794,5 @@ Aby pójść dalej, możesz zaimplementować [edytor wizualny](https://github.co
|
|
|
794
794
|
- [Dokumentacja Tanstack Start](https://reactrouter.com/)
|
|
795
795
|
- [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/react-intlayer/useIntlayer.md)
|
|
796
796
|
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/packages/react-intlayer/useLocale.md)
|
|
797
|
-
- [Deklaracja treści](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dictionary/
|
|
797
|
+
- [Deklaracja treści](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/dictionary/content_file.md)
|
|
798
798
|
- [Konfiguracja](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/configuration.md)
|
|
@@ -63,10 +63,10 @@ npm i -D @intlayer/sync-json-plugin
|
|
|
63
63
|
Dodaj wtyczkę do swojego pliku `intlayer.config.ts` i wskaż ją na istniejącą strukturę JSON.
|
|
64
64
|
|
|
65
65
|
```ts fileName="intlayer.config.ts"
|
|
66
|
-
import {
|
|
66
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
67
67
|
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
const config: IntlayerConfig = {
|
|
70
70
|
internationalization: {
|
|
71
71
|
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
72
72
|
defaultLocale: Locales.ENGLISH,
|
|
@@ -79,7 +79,9 @@ export default defineConfig({
|
|
|
79
79
|
source: ({ key, locale }) => `./locales/${locale}/${key}.json`,
|
|
80
80
|
}),
|
|
81
81
|
],
|
|
82
|
-
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default config;
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
Alternatywa: pojedynczy plik na locale (częste w konfiguracjach i18next/react-intl):
|
|
@@ -144,10 +146,10 @@ Gdy wiele wtyczek celuje w ten sam klucz słownika, parametr `priority` decyduje
|
|
|
144
146
|
- Wtyczki o tym samym priorytecie są przetwarzane w kolejności, w jakiej pojawiają się w konfiguracji
|
|
145
147
|
|
|
146
148
|
```ts fileName="intlayer.config.ts"
|
|
147
|
-
import {
|
|
149
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
148
150
|
import { syncJSON } from "@intlayer/sync-json-plugin";
|
|
149
151
|
|
|
150
|
-
|
|
152
|
+
const config: IntlayerConfig = {
|
|
151
153
|
internationalization: {
|
|
152
154
|
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
153
155
|
defaultLocale: Locales.ENGLISH,
|
|
@@ -178,7 +180,9 @@ export default defineConfig({
|
|
|
178
180
|
priority: 1,
|
|
179
181
|
}),
|
|
180
182
|
],
|
|
181
|
-
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export default config;
|
|
182
186
|
```
|
|
183
187
|
|
|
184
188
|
### Rozwiązywanie konfliktów
|
|
@@ -78,7 +78,7 @@ const MyComponent = () => {
|
|
|
78
78
|
|
|
79
79
|
Esse hook gerenciará a detecção de localidade para você e retornará o conteúdo para a localidade atual. Usando esse hook, você também poderá interpretar markdown, gerenciar pluralização e muito mais.
|
|
80
80
|
|
|
81
|
-
> Para ver todos os recursos do Intlayer, você pode ler a [documentação de dicionário](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
81
|
+
> Para ver todos os recursos do Intlayer, você pode ler a [documentação de dicionário](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
82
82
|
|
|
83
83
|
## Conteúdo remoto
|
|
84
84
|
|
package/docs/pt/index.md
CHANGED
|
@@ -56,7 +56,7 @@ Gerencie conteúdo e traduções usando nossa ferramenta de linha de comando. De
|
|
|
56
56
|
|
|
57
57
|
Organize seu conteúdo multilíngue próximo ao seu código para manter tudo consistente e fácil de manter.
|
|
58
58
|
|
|
59
|
-
- **[Começando](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
59
|
+
- **[Começando](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md)**
|
|
60
60
|
Aprenda o básico de como declarar seu conteúdo no Intlayer.
|
|
61
61
|
|
|
62
62
|
- **[Tradução](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/translation.md)**
|
|
@@ -67,7 +67,7 @@ yarn add react react-dom react-intlayer @astrojs/react
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
- **intlayer**
|
|
70
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
70
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
71
71
|
|
|
72
72
|
- **astro-intlayer**
|
|
73
73
|
Inclui o plugin de integração do Astro para integrar o Intlayer com o [empacotador Vite](https://vite.dev/guide/why.html#why-bundle-for-production), assim como middleware para detectar o idioma preferido do usuário, gerenciar cookies e lidar com redirecionamento de URL.
|
|
@@ -138,7 +138,7 @@ export default appContent;
|
|
|
138
138
|
|
|
139
139
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./src`). E correspondam à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
140
140
|
|
|
141
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
141
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
142
142
|
|
|
143
143
|
### Passo 5: Use seu conteúdo no Astro
|
|
144
144
|
|
|
@@ -68,7 +68,7 @@ bunx intlayer init
|
|
|
68
68
|
|
|
69
69
|
- **intlayer**
|
|
70
70
|
|
|
71
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
71
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpilação e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
72
72
|
|
|
73
73
|
- **react-intlayer**
|
|
74
74
|
|
|
@@ -259,7 +259,7 @@ module.exports = appContent;
|
|
|
259
259
|
|
|
260
260
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./src`). E correspondam à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
261
261
|
|
|
262
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
262
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
263
263
|
|
|
264
264
|
> Se o seu arquivo de conteúdo incluir código TSX, você deve considerar importar `import React from "react";` no seu arquivo de conteúdo.
|
|
265
265
|
|
|
@@ -223,7 +223,7 @@ module.exports = indexContent;
|
|
|
223
223
|
|
|
224
224
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./src`). E correspondam à extensão de arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
225
225
|
|
|
226
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
226
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
227
227
|
|
|
228
228
|
### Configuração da Aplicação Express
|
|
229
229
|
|
|
@@ -370,7 +370,7 @@ module.exports = appContent;
|
|
|
370
370
|
}
|
|
371
371
|
```
|
|
372
372
|
|
|
373
|
-
> Para mais detalhes sobre declarações de conteúdo, consulte a [documentação de conteúdo do Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
373
|
+
> Para mais detalhes sobre declarações de conteúdo, consulte a [documentação de conteúdo do Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
374
374
|
|
|
375
375
|
---
|
|
376
376
|
|
|
@@ -66,7 +66,7 @@ bunx intlayer init
|
|
|
66
66
|
|
|
67
67
|
- **intlayer**
|
|
68
68
|
|
|
69
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
69
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpilações e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
70
70
|
|
|
71
71
|
- **next-intlayer**
|
|
72
72
|
|
|
@@ -438,7 +438,7 @@ module.exports = pageContent;
|
|
|
438
438
|
|
|
439
439
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./src`). E correspondam à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
440
440
|
|
|
441
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
441
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
442
442
|
|
|
443
443
|
### Passo 7: Utilize o Conteúdo no Seu Código
|
|
444
444
|
|
|
@@ -76,7 +76,7 @@ bunx intlayer init
|
|
|
76
76
|
|
|
77
77
|
- **intlayer**
|
|
78
78
|
|
|
79
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
79
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
80
80
|
|
|
81
81
|
- **next-intlayer**
|
|
82
82
|
|
|
@@ -429,7 +429,7 @@ module.exports = pageContent;
|
|
|
429
429
|
|
|
430
430
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./src`). E correspondam à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
431
431
|
|
|
432
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
432
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
433
433
|
|
|
434
434
|
### Passo 6: Utilize o Conteúdo no Seu Código
|
|
435
435
|
|
|
@@ -379,9 +379,7 @@ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
|
|
|
379
379
|
import { useLocale } from "next-intlayer";
|
|
380
380
|
|
|
381
381
|
export const LocaleSwitcher: FC = () => {
|
|
382
|
-
const { locale, availableLocales, setLocale } = useLocale(
|
|
383
|
-
onChange: () => window.location.reload(),
|
|
384
|
-
});
|
|
382
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
385
383
|
|
|
386
384
|
return (
|
|
387
385
|
<div>
|
|
@@ -882,9 +882,7 @@ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
|
|
|
882
882
|
import { useLocale } from "next-intlayer";
|
|
883
883
|
|
|
884
884
|
export const LocaleSwitcher: FC = () => {
|
|
885
|
-
const { locale, availableLocales, setLocale } = useLocale(
|
|
886
|
-
onChange: () => window.location.reload(),
|
|
887
|
-
});
|
|
885
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
888
886
|
|
|
889
887
|
return (
|
|
890
888
|
<div>
|
|
@@ -927,9 +925,7 @@ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
|
|
|
927
925
|
import { useLocale } from "next-intlayer";
|
|
928
926
|
|
|
929
927
|
export const LocaleSwitcher = () => {
|
|
930
|
-
const { locale, availableLocales, setLocale } = useLocale(
|
|
931
|
-
onChange: () => window.location.reload(),
|
|
932
|
-
});
|
|
928
|
+
const { locale, availableLocales, setLocale } = useLocale();
|
|
933
929
|
|
|
934
930
|
return (
|
|
935
931
|
<div>
|
|
@@ -72,7 +72,7 @@ bunx intlayer init
|
|
|
72
72
|
|
|
73
73
|
- **intlayer**
|
|
74
74
|
|
|
75
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
75
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
76
76
|
|
|
77
77
|
- **next-intlayer**
|
|
78
78
|
|
|
@@ -448,7 +448,7 @@ module.exports = homeContent;
|
|
|
448
448
|
}
|
|
449
449
|
```
|
|
450
450
|
|
|
451
|
-
Para mais informações sobre como declarar conteúdo, consulte o [guia de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
451
|
+
Para mais informações sobre como declarar conteúdo, consulte o [guia de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
452
452
|
|
|
453
453
|
### Passo 7: Utilize o Conteúdo no Seu Código
|
|
454
454
|
|
|
@@ -1527,7 +1527,7 @@ Para mais detalhes sobre como usar a extensão, consulte a [documentação da Ex
|
|
|
1527
1527
|
## Recursos Adicionais
|
|
1528
1528
|
|
|
1529
1529
|
- **Documentação do Intlayer:** [Repositório GitHub](https://github.com/aymericzip/intlayer)
|
|
1530
|
-
- **Guia do Dicionário:** [Dicionário](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
1530
|
+
- **Guia do Dicionário:** [Dicionário](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md)
|
|
1531
1531
|
- **Documentação de Configuração:** [Guia de Configuração](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/configuration.md)
|
|
1532
1532
|
|
|
1533
1533
|
Seguindo este guia, você pode integrar efetivamente o Intlayer em sua aplicação Next.js usando o Page Router, possibilitando um suporte robusto e escalável para internacionalização em seus projetos web.
|
|
@@ -323,7 +323,7 @@ module.exports = appContent;
|
|
|
323
323
|
}
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
-
> Para detalhes sobre declarações de conteúdo, veja [a documentação de conteúdo do Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
326
|
+
> Para detalhes sobre declarações de conteúdo, veja [a documentação de conteúdo do Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
327
327
|
|
|
328
328
|
---
|
|
329
329
|
|
|
@@ -88,7 +88,7 @@ bunx intlayer init
|
|
|
88
88
|
|
|
89
89
|
- **intlayer**
|
|
90
90
|
|
|
91
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
91
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
92
92
|
|
|
93
93
|
- **react-intlayer**
|
|
94
94
|
O pacote que integra o Intlayer com a aplicação React. Ele fornece provedores de contexto e hooks para internacionalização em React.
|
|
@@ -294,7 +294,7 @@ export default pageContent;
|
|
|
294
294
|
|
|
295
295
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./app`). E correspondam à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
296
296
|
|
|
297
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
297
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
298
298
|
|
|
299
299
|
### Passo 7: Crie Componentes Sensíveis ao Locale
|
|
300
300
|
|
|
@@ -601,7 +601,7 @@ Para avançar, você pode implementar o [editor visual](https://github.com/aymer
|
|
|
601
601
|
- [Documentação React Router v7](https://reactrouter.com/)
|
|
602
602
|
- [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/packages/react-intlayer/useIntlayer.md)
|
|
603
603
|
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/packages/react-intlayer/useLocale.md)
|
|
604
|
-
- [Declaração de Conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
604
|
+
- [Declaração de Conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md)
|
|
605
605
|
- [Configuração](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/configuration.md)
|
|
606
606
|
|
|
607
607
|
Este guia abrangente fornece tudo o que você precisa para integrar o Intlayer com o React Router v7 para uma aplicação totalmente internacionalizada com roteamento sensível à localidade e suporte a TypeScript.
|
|
@@ -121,7 +121,7 @@ bunx intlayer init
|
|
|
121
121
|
|
|
122
122
|
- **intlayer**
|
|
123
123
|
|
|
124
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
124
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
125
125
|
|
|
126
126
|
- **react-intlayer**
|
|
127
127
|
O pacote que integra o Intlayer com aplicações React. Ele fornece provedores de contexto e hooks para internacionalização em React.
|
|
@@ -303,7 +303,7 @@ export default appContent;
|
|
|
303
303
|
|
|
304
304
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação assim que forem incluídas no diretório `contentDir` (por padrão, `./app`). E devem corresponder à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
305
305
|
|
|
306
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
306
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
307
307
|
|
|
308
308
|
### Passo 8: Crie Componentes e Hooks Sensíveis ao Locale
|
|
309
309
|
|
|
@@ -795,5 +795,5 @@ Para ir além, você pode implementar o [editor visual](https://github.com/aymer
|
|
|
795
795
|
- [Documentação do Tanstack Start](https://reactrouter.com/)
|
|
796
796
|
- [Hook useIntlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/packages/react-intlayer/useIntlayer.md)
|
|
797
797
|
- [useLocale hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/packages/react-intlayer/useLocale.md)
|
|
798
|
-
- [Declaração de Conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
798
|
+
- [Declaração de Conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md)
|
|
799
799
|
- [Configuração](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/configuration.md)
|
|
@@ -104,7 +104,7 @@ bunx intlayer init
|
|
|
104
104
|
|
|
105
105
|
- **intlayer**
|
|
106
106
|
|
|
107
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
107
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
108
108
|
|
|
109
109
|
- **solid-intlayer**
|
|
110
110
|
O pacote que integra o Intlayer com a aplicação Solid. Ele fornece provedores de contexto e hooks para internacionalização em Solid.
|
|
@@ -262,7 +262,7 @@ module.exports = appContent;
|
|
|
262
262
|
|
|
263
263
|
> As suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação assim que forem incluídas no diretório `contentDir` (por padrão, `./src`). E devem corresponder à extensão do ficheiro de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
264
264
|
|
|
265
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
265
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
266
266
|
|
|
267
267
|
### Passo 5: Utilize o Intlayer no Seu Código
|
|
268
268
|
|
|
@@ -93,7 +93,7 @@ bunx intlayer init
|
|
|
93
93
|
|
|
94
94
|
- **intlayer**
|
|
95
95
|
|
|
96
|
-
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
96
|
+
O pacote principal que fornece ferramentas de internacionalização para gerenciamento de configuração, tradução, [declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md), transpiração e [comandos CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/intlayer_cli.md).
|
|
97
97
|
|
|
98
98
|
- **vue-intlayer**
|
|
99
99
|
O pacote que integra o Intlayer com a aplicação Vue. Ele fornece provedores de contexto e composables para internacionalização em Vue.
|
|
@@ -418,7 +418,7 @@ module.exports = appContent;
|
|
|
418
418
|
|
|
419
419
|
> Suas declarações de conteúdo podem ser definidas em qualquer lugar da sua aplicação, desde que estejam incluídas no diretório `contentDir` (por padrão, `./src`). E correspondam à extensão do arquivo de declaração de conteúdo (por padrão, `.content.{json,ts,tsx,js,jsx,mjs,cjs}`).
|
|
420
420
|
|
|
421
|
-
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
421
|
+
> Para mais detalhes, consulte a [documentação de declaração de conteúdo](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
422
422
|
|
|
423
423
|
### Passo 5: Utilize o Intlayer no Seu Código
|
|
424
424
|
|
package/docs/pt/introduction.md
CHANGED
|
@@ -157,7 +157,7 @@ O Intlayer oferece uma variedade de funcionalidades adaptadas para atender às n
|
|
|
157
157
|
|
|
158
158
|
Organize seu conteúdo multilíngue próximo ao seu código para manter tudo consistente e fácil de manter.
|
|
159
159
|
|
|
160
|
-
- **[Começando](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
160
|
+
- **[Começando](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md)**
|
|
161
161
|
Aprenda o básico de como declarar seu conteúdo no Intlayer.
|
|
162
162
|
|
|
163
163
|
- **[Tradução](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/translation.md)**
|
|
@@ -69,7 +69,7 @@ O hook aceita dois parâmetros:
|
|
|
69
69
|
|
|
70
70
|
## Dicionário
|
|
71
71
|
|
|
72
|
-
Todos os objetos de dicionário devem ser declarados em arquivos de conteúdo estruturado para garantir a segurança de tipos e evitar erros em tempo de execução. Você pode encontrar as [instruções de configuração aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
72
|
+
Todos os objetos de dicionário devem ser declarados em arquivos de conteúdo estruturado para garantir a segurança de tipos e evitar erros em tempo de execução. Você pode encontrar as [instruções de configuração aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md). Aqui está um exemplo de declaração de conteúdo:
|
|
73
73
|
|
|
74
74
|
```typescript fileName="component.content.ts" codeFormat="typescript"
|
|
75
75
|
import { t, type Dictionary } from "intlayer";
|
|
@@ -69,7 +69,7 @@ Dependendo se você está trabalhando em componentes do lado do cliente ou do la
|
|
|
69
69
|
|
|
70
70
|
É crucial que todas as chaves de conteúdo estejam definidas dentro dos arquivos de declaração de conteúdo para evitar erros em tempo de execução e garantir a segurança de tipos. Essa abordagem também facilita a integração com TypeScript para validação em tempo de compilação.
|
|
71
71
|
|
|
72
|
-
Instruções para configurar arquivos de declaração de conteúdo estão disponíveis [aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
72
|
+
Instruções para configurar arquivos de declaração de conteúdo estão disponíveis [aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
73
73
|
|
|
74
74
|
## Exemplo de Uso no Next.js
|
|
75
75
|
|
|
@@ -68,7 +68,7 @@ O hook aceita dois parâmetros:
|
|
|
68
68
|
|
|
69
69
|
## Dicionário
|
|
70
70
|
|
|
71
|
-
Todos os objetos dicionário devem ser declarados em arquivos de conteúdo estruturado para garantir a segurança de tipos e evitar erros em tempo de execução. Você pode encontrar as [instruções de configuração aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
71
|
+
Todos os objetos dicionário devem ser declarados em arquivos de conteúdo estruturado para garantir a segurança de tipos e evitar erros em tempo de execução. Você pode encontrar as [instruções de configuração aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md). Aqui está um exemplo de declaração de conteúdo:
|
|
72
72
|
|
|
73
73
|
```typescript fileName="./component.content.ts" contentDeclarationFormat="typescript"
|
|
74
74
|
import { t, type Dictionary } from "intlayer";
|
|
@@ -70,7 +70,7 @@ Este hook aceita dois parâmetros:
|
|
|
70
70
|
|
|
71
71
|
## Dicionário
|
|
72
72
|
|
|
73
|
-
Todas as chaves do dicionário devem ser declaradas dentro dos arquivos de declaração de conteúdo para aumentar a segurança de tipos e evitar erros. [Instruções de configuração podem ser encontradas aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
73
|
+
Todas as chaves do dicionário devem ser declaradas dentro dos arquivos de declaração de conteúdo para aumentar a segurança de tipos e evitar erros. [Instruções de configuração podem ser encontradas aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
74
74
|
|
|
75
75
|
## Exemplos de Uso em React
|
|
76
76
|
|
|
@@ -69,7 +69,7 @@ O hook aceita dois parâmetros:
|
|
|
69
69
|
|
|
70
70
|
## Dicionário
|
|
71
71
|
|
|
72
|
-
Todas as chaves do dicionário devem ser declaradas dentro dos arquivos de declaração de conteúdo para aumentar a segurança de tipos e evitar erros. Você pode encontrar as [instruções de configuração aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/
|
|
72
|
+
Todas as chaves do dicionário devem ser declaradas dentro dos arquivos de declaração de conteúdo para aumentar a segurança de tipos e evitar erros. Você pode encontrar as [instruções de configuração aqui](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pt/dictionary/content_file.md).
|
|
73
73
|
|
|
74
74
|
## Exemplo de Uso em React
|
|
75
75
|
|