@intlayer/docs 7.0.6 → 7.0.8-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/ar/i18n_using_next-i18next.md +1068 -0
- package/blog/ar/i18n_using_next-intl.md +768 -0
- package/blog/ar/intlayer_with_react-intl.md +0 -4
- package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +5 -4
- package/blog/de/i18n_using_next-i18next.md +1107 -0
- package/blog/de/i18n_using_next-intl.md +760 -0
- package/blog/de/intlayer_with_react-intl.md +0 -4
- package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/en/i18n_using_next-i18next.md +1073 -0
- package/blog/en/i18n_using_next-intl.md +757 -0
- package/blog/en/intlayer_with_i18next.md +71 -8
- package/blog/en/intlayer_with_next-i18next.md +71 -8
- package/blog/en/intlayer_with_next-intl.md +71 -8
- package/blog/en/intlayer_with_react-i18next.md +69 -8
- package/blog/en/intlayer_with_react-intl.md +68 -9
- package/blog/en/intlayer_with_vue-i18n.md +68 -7
- package/blog/en/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/blog/en/vue-i18n_vs_intlayer.md +2 -0
- package/blog/en-GB/i18n_using_next-i18next.md +1074 -0
- package/blog/en-GB/i18n_using_next-intl.md +757 -0
- package/blog/en-GB/intlayer_with_i18next.md +15 -6
- package/blog/en-GB/intlayer_with_next-i18next.md +16 -6
- package/blog/en-GB/intlayer_with_next-intl.md +16 -6
- package/blog/en-GB/intlayer_with_react-i18next.md +16 -7
- package/blog/en-GB/intlayer_with_react-intl.md +14 -9
- package/blog/en-GB/intlayer_with_vue-i18n.md +16 -7
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/en-GB/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/blog/en-GB/vue-i18n_vs_intlayer.md +2 -0
- package/blog/es/i18n_using_next-i18next.md +1066 -0
- package/blog/es/i18n_using_next-intl.md +757 -0
- package/blog/es/intlayer_with_react-intl.md +0 -4
- package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/fr/i18n_using_next-i18next.md +1078 -0
- package/blog/fr/i18n_using_next-intl.md +759 -0
- package/blog/fr/intlayer_with_react-intl.md +0 -4
- package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/hi/i18n_using_next-i18next.md +1068 -0
- package/blog/hi/i18n_using_next-intl.md +758 -0
- package/blog/hi/intlayer_with_react-intl.md +0 -4
- package/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/id/i18n_using_next-i18next.md +1078 -0
- package/blog/id/i18n_using_next-intl.md +757 -0
- package/blog/id/index.md +69 -0
- package/blog/id/internationalization_and_SEO.md +364 -0
- package/blog/id/intlayer_with_react-intl.md +0 -4
- package/blog/id/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/id/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/id/list_i18n_technologies/CMS/wordpress.md +188 -0
- package/blog/id/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/id/list_i18n_technologies/frameworks/flutter.md +150 -0
- package/blog/id/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/id/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/id/list_i18n_technologies/frameworks/svelte.md +131 -0
- package/blog/id/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/id/next-i18next_vs_next-intl_vs_intlayer.md +1500 -0
- package/blog/id/nextjs-multilingual-seo-comparison.md +361 -0
- package/blog/id/rag_powered_documentation_assistant.md +288 -0
- package/blog/id/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/id/vue-i18n_vs_intlayer.md +278 -0
- package/blog/id/what_is_internationalization.md +166 -0
- package/blog/it/i18n_using_next-i18next.md +1078 -0
- package/blog/it/i18n_using_next-intl.md +758 -0
- package/blog/it/intlayer_with_react-intl.md +0 -4
- package/blog/it/react-i18next_vs_react-intl_vs_intlayer.md +4 -0
- package/blog/it/vue-i18n_vs_intlayer.md +2 -0
- package/blog/ja/i18n_using_next-i18next.md +1078 -0
- package/blog/ja/i18n_using_next-intl.md +758 -0
- package/blog/ja/intlayer_with_react-intl.md +0 -4
- package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/ko/i18n_using_next-i18next.md +1075 -0
- package/blog/ko/i18n_using_next-intl.md +759 -0
- package/blog/ko/intlayer_with_react-intl.md +0 -4
- package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/pl/i18n_using_next-i18next.md +1078 -0
- package/blog/pl/i18n_using_next-intl.md +758 -0
- package/blog/pl/index.md +69 -0
- package/blog/pl/internationalization_and_SEO.md +363 -0
- package/blog/pl/intlayer_with_react-intl.md +0 -4
- package/blog/pl/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/pl/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/pl/list_i18n_technologies/CMS/wordpress.md +196 -0
- package/blog/pl/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/pl/list_i18n_technologies/frameworks/flutter.md +151 -0
- package/blog/pl/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/pl/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/pl/list_i18n_technologies/frameworks/svelte.md +131 -0
- package/blog/pl/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/pl/next-i18next_vs_next-intl_vs_intlayer.md +1501 -0
- package/blog/pl/nextjs-multilingual-seo-comparison.md +362 -0
- package/blog/pl/rag_powered_documentation_assistant.md +288 -0
- package/blog/pl/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/pl/vue-i18n_vs_intlayer.md +278 -0
- package/blog/pl/what_is_internationalization.md +167 -0
- package/blog/pt/i18n_using_next-i18next.md +1067 -0
- package/blog/pt/i18n_using_next-intl.md +760 -0
- package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/ru/i18n_using_next-i18next.md +1106 -0
- package/blog/ru/i18n_using_next-intl.md +759 -0
- package/blog/ru/intlayer_with_react-intl.md +0 -4
- package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/tr/i18n_using_next-i18next.md +1078 -0
- package/blog/tr/i18n_using_next-intl.md +760 -0
- package/blog/tr/intlayer_with_react-intl.md +0 -4
- package/blog/tr/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/tr/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/blog/tr/vue-i18n_vs_intlayer.md +2 -0
- package/blog/vi/i18n_using_next-i18next.md +1080 -0
- package/blog/vi/i18n_using_next-intl.md +758 -0
- package/blog/vi/index.md +69 -0
- package/blog/vi/internationalization_and_SEO.md +363 -0
- package/blog/vi/intlayer_with_react-intl.md +0 -4
- package/blog/vi/list_i18n_technologies/CMS/drupal.md +143 -0
- package/blog/vi/list_i18n_technologies/CMS/wix.md +167 -0
- package/blog/vi/list_i18n_technologies/CMS/wordpress.md +188 -0
- package/blog/vi/list_i18n_technologies/frameworks/angular.md +125 -0
- package/blog/vi/list_i18n_technologies/frameworks/flutter.md +150 -0
- package/blog/vi/list_i18n_technologies/frameworks/react-native.md +217 -0
- package/blog/vi/list_i18n_technologies/frameworks/react.md +155 -0
- package/blog/vi/list_i18n_technologies/frameworks/svelte.md +131 -0
- package/blog/vi/list_i18n_technologies/frameworks/vue.md +130 -0
- package/blog/vi/next-i18next_vs_next-intl_vs_intlayer.md +1520 -0
- package/blog/vi/nextjs-multilingual-seo-comparison.md +362 -0
- package/blog/vi/rag_powered_documentation_assistant.md +288 -0
- package/blog/vi/react-i18next_vs_react-intl_vs_intlayer.md +164 -0
- package/blog/vi/vue-i18n_vs_intlayer.md +278 -0
- package/blog/vi/what_is_internationalization.md +168 -0
- package/blog/zh/i18n_using_next-i18next.md +1105 -0
- package/blog/zh/i18n_using_next-intl.md +758 -0
- package/blog/zh/intlayer_with_react-intl.md +0 -4
- package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +2 -0
- package/blog/zh/react-i18next_vs_react-intl_vs_intlayer.md +2 -0
- package/dist/cjs/common.cjs +0 -4
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +38 -6
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +0 -6
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +0 -6
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +0 -6
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +38 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +2 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/docs/ar/component_i18n.md +1 -1
- package/docs/ar/configuration.md +6 -0
- package/docs/ar/intlayer_cli.md +8 -3
- package/docs/ar/intlayer_with_next-i18next.md +619 -0
- package/docs/ar/intlayer_with_next-intl.md +446 -0
- package/docs/ar/intlayer_with_nextjs_16.md +21 -0
- package/docs/ar/intlayer_with_tanstack.md +4 -0
- package/docs/ar/intlayer_with_vite+react.md +4 -0
- package/docs/de/component_i18n.md +1 -1
- package/docs/de/configuration.md +6 -0
- package/docs/de/intlayer_cli.md +8 -3
- package/docs/de/intlayer_with_next-i18next.md +627 -0
- package/docs/de/intlayer_with_next-intl.md +451 -0
- package/docs/de/intlayer_with_nextjs_16.md +21 -0
- package/docs/de/intlayer_with_tanstack.md +4 -0
- package/docs/de/intlayer_with_vite+react.md +4 -0
- package/docs/en/component_i18n.md +1 -1
- package/docs/en/intlayer_cli.md +8 -1
- package/docs/en/intlayer_with_astro.md +10 -2
- package/docs/en/intlayer_with_create_react_app.md +8 -0
- package/docs/en/intlayer_with_lynx+react.md +8 -0
- package/docs/en/intlayer_with_nestjs.md +10 -0
- package/docs/en/intlayer_with_nextjs_14.md +10 -2
- package/docs/en/intlayer_with_nextjs_15.md +21 -4
- package/docs/en/intlayer_with_nextjs_16.md +17 -0
- package/docs/en/intlayer_with_nuxt.md +8 -0
- package/docs/en/intlayer_with_react_native+expo.md +10 -2
- package/docs/en/intlayer_with_react_router_v7.md +8 -0
- package/docs/en/intlayer_with_tanstack.md +10 -0
- package/docs/en/intlayer_with_vite+preact.md +10 -2
- package/docs/en/intlayer_with_vite+react.md +21 -4
- package/docs/en/intlayer_with_vite+vue.md +10 -2
- package/docs/en-GB/component_i18n.md +1 -1
- package/docs/en-GB/configuration.md +6 -0
- package/docs/en-GB/intlayer_cli.md +8 -3
- package/docs/en-GB/intlayer_with_angular.md +4 -4
- package/docs/en-GB/intlayer_with_express.md +4 -4
- package/docs/en-GB/intlayer_with_lynx+react.md +12 -12
- package/{blog/en/_intlayer_with_next-i18next.md → docs/en-GB/intlayer_with_next-i18next.md} +241 -42
- package/{blog/en/_intlayer_with_next-intl.md → docs/en-GB/intlayer_with_next-intl.md} +144 -29
- package/docs/en-GB/intlayer_with_nextjs_16.md +21 -0
- package/docs/en-GB/intlayer_with_tanstack.md +5 -1
- package/docs/en-GB/intlayer_with_vite+react.md +4 -0
- package/docs/en-GB/packages/next-intlayer/t.md +2 -2
- package/docs/es/component_i18n.md +1 -1
- package/docs/es/configuration.md +6 -0
- package/docs/es/intlayer_cli.md +8 -3
- package/docs/es/intlayer_with_next-i18next.md +628 -0
- package/docs/es/intlayer_with_next-intl.md +446 -0
- package/docs/es/intlayer_with_nextjs_16.md +21 -0
- package/docs/es/intlayer_with_tanstack.md +4 -0
- package/docs/es/intlayer_with_vite+react.md +4 -0
- package/docs/fr/configuration.md +6 -0
- package/docs/fr/intlayer_cli.md +8 -3
- package/docs/fr/intlayer_with_next-i18next.md +628 -0
- package/docs/fr/intlayer_with_next-intl.md +446 -0
- package/docs/fr/intlayer_with_nextjs_16.md +23 -2
- package/docs/fr/intlayer_with_tanstack.md +4 -0
- package/docs/fr/intlayer_with_vite+react.md +4 -0
- package/docs/hi/component_i18n.md +1 -1
- package/docs/hi/configuration.md +6 -0
- package/docs/hi/intlayer_cli.md +8 -0
- package/docs/hi/intlayer_with_next-i18next.md +628 -0
- package/docs/hi/intlayer_with_next-intl.md +446 -0
- package/docs/hi/intlayer_with_nextjs_16.md +21 -0
- package/docs/hi/intlayer_with_tanstack.md +4 -0
- package/docs/hi/intlayer_with_vite+react.md +4 -0
- package/docs/id/CI_CD.md +198 -0
- package/docs/id/autoFill.md +284 -0
- package/docs/id/component_i18n.md +186 -0
- package/docs/id/configuration.md +710 -0
- package/docs/id/dictionary/condition.md +231 -0
- package/docs/id/dictionary/content_file.md +1092 -0
- package/docs/id/dictionary/enumeration.md +245 -0
- package/docs/id/dictionary/file.md +237 -0
- package/docs/id/dictionary/function_fetching.md +214 -0
- package/docs/id/dictionary/gender.md +273 -0
- package/docs/id/dictionary/insertion.md +192 -0
- package/docs/id/dictionary/markdown.md +381 -0
- package/docs/id/dictionary/nesting.md +273 -0
- package/docs/id/dictionary/translation.md +310 -0
- package/docs/id/formatters.md +596 -0
- package/docs/id/how_works_intlayer.md +256 -0
- package/docs/id/index.md +176 -0
- package/docs/id/interest_of_intlayer.md +293 -0
- package/docs/id/intlayer_CMS.md +549 -0
- package/docs/id/intlayer_cli.md +850 -0
- package/docs/id/intlayer_visual_editor.md +288 -0
- package/docs/id/intlayer_with_angular.md +694 -0
- package/docs/id/intlayer_with_astro.md +252 -0
- package/docs/id/intlayer_with_create_react_app.md +1233 -0
- package/docs/id/intlayer_with_express.md +411 -0
- package/docs/id/intlayer_with_lynx+react.md +518 -0
- package/docs/id/intlayer_with_nestjs.md +272 -0
- package/docs/id/intlayer_with_next-i18next.md +628 -0
- package/docs/id/intlayer_with_next-intl.md +446 -0
- package/docs/id/intlayer_with_nextjs_14.md +1617 -0
- package/docs/id/intlayer_with_nextjs_15.md +1698 -0
- package/docs/id/intlayer_with_nextjs_16.md +21 -0
- package/docs/id/intlayer_with_nextjs_page_router.md +1478 -0
- package/docs/id/intlayer_with_nuxt.md +808 -0
- package/docs/id/intlayer_with_react_native+expo.md +699 -0
- package/docs/id/intlayer_with_react_router_v7.md +496 -0
- package/docs/id/intlayer_with_tanstack.md +564 -0
- package/docs/id/intlayer_with_vite+preact.md +1737 -0
- package/docs/id/intlayer_with_vite+react.md +1413 -0
- package/docs/id/intlayer_with_vite+solid.md +289 -0
- package/docs/id/intlayer_with_vite+svelte.md +289 -0
- package/docs/id/intlayer_with_vite+vue.md +1088 -0
- package/docs/id/introduction.md +218 -0
- package/docs/id/locale_mapper.md +242 -0
- package/docs/id/mcp_server.md +211 -0
- package/docs/id/packages/express-intlayer/t.md +458 -0
- package/docs/id/packages/intlayer/getConfiguration.md +145 -0
- package/docs/id/packages/intlayer/getEnumeration.md +159 -0
- package/docs/id/packages/intlayer/getHTMLTextDir.md +122 -0
- package/docs/id/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/id/packages/intlayer/getLocaleName.md +119 -0
- package/docs/id/packages/intlayer/getLocalizedUrl.md +309 -0
- package/docs/id/packages/intlayer/getMultilingualUrls.md +223 -0
- package/docs/id/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/id/packages/intlayer/getTranslation.md +190 -0
- package/docs/id/packages/intlayer/getTranslationContent.md +188 -0
- package/docs/id/packages/next-intlayer/t.md +352 -0
- package/docs/id/packages/next-intlayer/useDictionary.md +271 -0
- package/docs/id/packages/next-intlayer/useIntlayer.md +264 -0
- package/docs/id/packages/next-intlayer/useLocale.md +166 -0
- package/docs/id/packages/react-intlayer/t.md +303 -0
- package/docs/id/packages/react-intlayer/useDictionary.md +287 -0
- package/docs/id/packages/react-intlayer/useI18n.md +267 -0
- package/docs/id/packages/react-intlayer/useIntlayer.md +254 -0
- package/docs/id/packages/react-intlayer/useLocale.md +210 -0
- package/docs/id/per_locale_file.md +323 -0
- package/docs/id/readme.md +261 -0
- package/docs/id/releases/v6.md +305 -0
- package/docs/id/roadmap.md +362 -0
- package/docs/id/testing.md +202 -0
- package/docs/id/vs_code_extension.md +126 -0
- package/docs/it/component_i18n.md +1 -1
- package/docs/it/configuration.md +6 -0
- package/docs/it/intlayer_cli.md +8 -3
- package/docs/it/intlayer_with_next-i18next.md +628 -0
- package/docs/it/intlayer_with_next-intl.md +446 -0
- package/docs/it/intlayer_with_nextjs_16.md +21 -0
- package/docs/it/intlayer_with_tanstack.md +4 -0
- package/docs/it/intlayer_with_vite+react.md +4 -0
- package/docs/ja/component_i18n.md +1 -1
- package/docs/ja/configuration.md +6 -0
- package/docs/ja/intlayer_cli.md +8 -3
- package/docs/ja/intlayer_with_next-i18next.md +627 -0
- package/docs/ja/intlayer_with_next-intl.md +446 -0
- package/docs/ja/intlayer_with_nextjs_16.md +21 -0
- package/docs/ja/intlayer_with_tanstack.md +4 -0
- package/docs/ja/intlayer_with_vite+react.md +4 -0
- package/docs/ko/configuration.md +6 -0
- package/docs/ko/intlayer_cli.md +8 -3
- package/docs/ko/intlayer_with_next-i18next.md +627 -0
- package/docs/ko/intlayer_with_next-intl.md +446 -0
- package/docs/ko/intlayer_with_nextjs_16.md +21 -0
- package/docs/ko/intlayer_with_tanstack.md +4 -0
- package/docs/ko/intlayer_with_vite+react.md +4 -0
- package/docs/pl/CI_CD.md +198 -0
- package/docs/pl/autoFill.md +284 -0
- package/docs/pl/component_i18n.md +186 -0
- package/docs/pl/configuration.md +710 -0
- package/docs/pl/dictionary/condition.md +232 -0
- package/docs/pl/dictionary/content_file.md +1130 -0
- package/docs/pl/dictionary/enumeration.md +245 -0
- package/docs/pl/dictionary/file.md +234 -0
- package/docs/pl/dictionary/function_fetching.md +214 -0
- package/docs/pl/dictionary/gender.md +276 -0
- package/docs/pl/dictionary/insertion.md +188 -0
- package/docs/pl/dictionary/markdown.md +408 -0
- package/docs/pl/dictionary/nesting.md +273 -0
- package/docs/pl/dictionary/translation.md +310 -0
- package/docs/pl/formatters.md +596 -0
- package/docs/pl/how_works_intlayer.md +256 -0
- package/docs/pl/index.md +176 -0
- package/docs/pl/interest_of_intlayer.md +291 -0
- package/docs/pl/intlayer_CMS.md +549 -0
- package/docs/pl/intlayer_cli.md +857 -0
- package/docs/pl/intlayer_visual_editor.md +288 -0
- package/docs/pl/intlayer_with_angular.md +690 -0
- package/docs/pl/intlayer_with_astro.md +280 -0
- package/docs/pl/intlayer_with_create_react_app.md +1235 -0
- package/docs/pl/intlayer_with_express.md +411 -0
- package/docs/pl/intlayer_with_lynx+react.md +518 -0
- package/docs/pl/intlayer_with_nestjs.md +272 -0
- package/docs/pl/intlayer_with_next-i18next.md +628 -0
- package/docs/pl/intlayer_with_next-intl.md +446 -0
- package/docs/pl/intlayer_with_nextjs_14.md +1594 -0
- package/docs/pl/intlayer_with_nextjs_15.md +1701 -0
- package/docs/pl/intlayer_with_nextjs_16.md +21 -0
- package/docs/pl/intlayer_with_nextjs_page_router.md +1513 -0
- package/docs/pl/intlayer_with_nuxt.md +885 -0
- package/docs/pl/intlayer_with_react_native+expo.md +698 -0
- package/docs/pl/intlayer_with_react_router_v7.md +503 -0
- package/docs/pl/intlayer_with_tanstack.md +562 -0
- package/docs/pl/intlayer_with_vite+preact.md +1736 -0
- package/docs/pl/intlayer_with_vite+react.md +1438 -0
- package/docs/pl/intlayer_with_vite+solid.md +290 -0
- package/docs/pl/intlayer_with_vite+svelte.md +289 -0
- package/docs/pl/intlayer_with_vite+vue.md +1116 -0
- package/docs/pl/introduction.md +209 -0
- package/docs/pl/locale_mapper.md +242 -0
- package/docs/pl/mcp_server.md +211 -0
- package/docs/pl/packages/express-intlayer/t.md +458 -0
- package/docs/pl/packages/intlayer/getConfiguration.md +146 -0
- package/docs/pl/packages/intlayer/getEnumeration.md +160 -0
- package/docs/pl/packages/intlayer/getHTMLTextDir.md +121 -0
- package/docs/pl/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/pl/packages/intlayer/getLocaleName.md +118 -0
- package/docs/pl/packages/intlayer/getLocalizedUrl.md +300 -0
- package/docs/pl/packages/intlayer/getMultilingualUrls.md +221 -0
- package/docs/pl/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/pl/packages/intlayer/getTranslation.md +190 -0
- package/docs/pl/packages/intlayer/getTranslationContent.md +189 -0
- package/docs/pl/packages/next-intlayer/t.md +353 -0
- package/docs/pl/packages/next-intlayer/useDictionary.md +270 -0
- package/docs/pl/packages/next-intlayer/useIntlayer.md +263 -0
- package/docs/pl/packages/next-intlayer/useLocale.md +166 -0
- package/docs/pl/packages/react-intlayer/t.md +303 -0
- package/docs/pl/packages/react-intlayer/useDictionary.md +289 -0
- package/docs/pl/packages/react-intlayer/useI18n.md +249 -0
- package/docs/pl/packages/react-intlayer/useIntlayer.md +256 -0
- package/docs/pl/packages/react-intlayer/useLocale.md +210 -0
- package/docs/pl/per_locale_file.md +321 -0
- package/docs/pl/readme.md +261 -0
- package/docs/pl/releases/v6.md +305 -0
- package/docs/pl/roadmap.md +362 -0
- package/docs/pl/testing.md +202 -0
- package/docs/pl/vs_code_extension.md +126 -0
- package/docs/pt/component_i18n.md +1 -1
- package/docs/pt/configuration.md +6 -0
- package/docs/pt/intlayer_cli.md +8 -3
- package/docs/pt/intlayer_with_next-i18next.md +627 -0
- package/docs/pt/intlayer_with_next-intl.md +446 -0
- package/docs/pt/intlayer_with_nextjs_16.md +21 -0
- package/docs/pt/intlayer_with_tanstack.md +4 -0
- package/docs/pt/intlayer_with_vite+react.md +4 -0
- package/docs/ru/component_i18n.md +1 -1
- package/docs/ru/configuration.md +6 -0
- package/docs/ru/intlayer_cli.md +301 -22
- package/docs/ru/intlayer_with_next-i18next.md +629 -0
- package/docs/ru/intlayer_with_next-intl.md +448 -0
- package/docs/ru/intlayer_with_nextjs_16.md +21 -0
- package/docs/ru/intlayer_with_tanstack.md +4 -0
- package/docs/ru/intlayer_with_vite+react.md +4 -0
- package/docs/tr/component_i18n.md +1 -1
- package/docs/tr/configuration.md +6 -0
- package/docs/tr/intlayer_cli.md +8 -0
- package/docs/tr/intlayer_with_next-i18next.md +627 -0
- package/docs/tr/intlayer_with_next-intl.md +446 -0
- package/docs/tr/intlayer_with_nextjs_16.md +21 -0
- package/docs/tr/intlayer_with_tanstack.md +4 -0
- package/docs/tr/intlayer_with_vite+react.md +4 -0
- package/docs/vi/CI_CD.md +198 -0
- package/docs/vi/autoFill.md +284 -0
- package/docs/vi/component_i18n.md +186 -0
- package/docs/vi/configuration.md +710 -0
- package/docs/vi/dictionary/condition.md +237 -0
- package/docs/vi/dictionary/content_file.md +1115 -0
- package/docs/vi/dictionary/enumeration.md +255 -0
- package/docs/vi/dictionary/file.md +234 -0
- package/docs/vi/dictionary/function_fetching.md +212 -0
- package/docs/vi/dictionary/gender.md +275 -0
- package/docs/vi/dictionary/insertion.md +191 -0
- package/docs/vi/dictionary/markdown.md +381 -0
- package/docs/vi/dictionary/nesting.md +273 -0
- package/docs/vi/dictionary/translation.md +309 -0
- package/docs/vi/formatters.md +595 -0
- package/docs/vi/how_works_intlayer.md +256 -0
- package/docs/vi/index.md +174 -0
- package/docs/vi/interest_of_intlayer.md +292 -0
- package/docs/vi/intlayer_CMS.md +549 -0
- package/docs/vi/intlayer_cli.md +850 -0
- package/docs/vi/intlayer_visual_editor.md +288 -0
- package/docs/vi/intlayer_with_angular.md +692 -0
- package/docs/vi/intlayer_with_astro.md +252 -0
- package/docs/vi/intlayer_with_create_react_app.md +1230 -0
- package/docs/vi/intlayer_with_express.md +409 -0
- package/docs/vi/intlayer_with_lynx+react.md +520 -0
- package/docs/vi/intlayer_with_nestjs.md +272 -0
- package/docs/vi/intlayer_with_next-i18next.md +628 -0
- package/docs/vi/intlayer_with_next-intl.md +446 -0
- package/docs/vi/intlayer_with_nextjs_14.md +1584 -0
- package/docs/vi/intlayer_with_nextjs_15.md +1738 -0
- package/docs/vi/intlayer_with_nextjs_16.md +21 -0
- package/docs/vi/intlayer_with_nextjs_page_router.md +1504 -0
- package/docs/vi/intlayer_with_nuxt.md +821 -0
- package/docs/vi/intlayer_with_react_native+expo.md +700 -0
- package/docs/vi/intlayer_with_react_router_v7.md +498 -0
- package/docs/vi/intlayer_with_tanstack.md +562 -0
- package/docs/vi/intlayer_with_vite+preact.md +1722 -0
- package/docs/vi/intlayer_with_vite+react.md +1407 -0
- package/docs/vi/intlayer_with_vite+solid.md +287 -0
- package/docs/vi/intlayer_with_vite+svelte.md +289 -0
- package/docs/vi/intlayer_with_vite+vue.md +1071 -0
- package/docs/vi/introduction.md +215 -0
- package/docs/vi/locale_mapper.md +242 -0
- package/docs/vi/mcp_server.md +211 -0
- package/docs/vi/packages/express-intlayer/t.md +457 -0
- package/docs/vi/packages/intlayer/getConfiguration.md +145 -0
- package/docs/vi/packages/intlayer/getEnumeration.md +162 -0
- package/docs/vi/packages/intlayer/getHTMLTextDir.md +121 -0
- package/docs/vi/packages/intlayer/getLocaleLang.md +81 -0
- package/docs/vi/packages/intlayer/getLocaleName.md +129 -0
- package/docs/vi/packages/intlayer/getLocalizedUrl.md +309 -0
- package/docs/vi/packages/intlayer/getMultilingualUrls.md +221 -0
- package/docs/vi/packages/intlayer/getPathWithoutLocale.md +75 -0
- package/docs/vi/packages/intlayer/getTranslation.md +201 -0
- package/docs/vi/packages/intlayer/getTranslationContent.md +188 -0
- package/docs/vi/packages/next-intlayer/t.md +352 -0
- package/docs/vi/packages/next-intlayer/useDictionary.md +273 -0
- package/docs/vi/packages/next-intlayer/useIntlayer.md +264 -0
- package/docs/vi/packages/next-intlayer/useLocale.md +166 -0
- package/docs/vi/packages/react-intlayer/t.md +304 -0
- package/docs/vi/packages/react-intlayer/useDictionary.md +288 -0
- package/docs/vi/packages/react-intlayer/useI18n.md +295 -0
- package/docs/vi/packages/react-intlayer/useIntlayer.md +256 -0
- package/docs/vi/packages/react-intlayer/useLocale.md +210 -0
- package/docs/vi/per_locale_file.md +326 -0
- package/docs/vi/readme.md +261 -0
- package/docs/vi/releases/v6.md +305 -0
- package/docs/vi/roadmap.md +346 -0
- package/docs/vi/testing.md +202 -0
- package/docs/vi/vs_code_extension.md +126 -0
- package/docs/zh/configuration.md +6 -0
- package/docs/zh/intlayer_cli.md +8 -3
- package/docs/zh/intlayer_with_next-i18next.md +628 -0
- package/docs/zh/intlayer_with_next-intl.md +448 -0
- package/docs/zh/intlayer_with_nextjs_16.md +21 -0
- package/docs/zh/intlayer_with_tanstack.md +4 -0
- package/docs/zh/intlayer_with_vite+react.md +4 -0
- package/frequent_questions/ar/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ar/array_as_content_declaration.md +1 -2
- package/frequent_questions/ar/build_dictionaries.md +1 -2
- package/frequent_questions/ar/build_error_CI_CD.md +1 -2
- package/frequent_questions/ar/bun_set_up.md +1 -2
- package/frequent_questions/ar/customized_locale_list.md +1 -2
- package/frequent_questions/ar/domain_routing.md +1 -2
- package/frequent_questions/ar/esbuild_error.md +1 -2
- package/frequent_questions/ar/get_locale_cookie.md +1 -2
- package/frequent_questions/ar/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ar/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ar/static_rendering.md +1 -3
- package/frequent_questions/ar/translated_path_url.md +1 -2
- package/frequent_questions/ar/unknown_command.md +1 -2
- package/frequent_questions/de/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/de/array_as_content_declaration.md +1 -2
- package/frequent_questions/de/build_dictionaries.md +1 -2
- package/frequent_questions/de/build_error_CI_CD.md +1 -2
- package/frequent_questions/de/bun_set_up.md +1 -2
- package/frequent_questions/de/customized_locale_list.md +1 -2
- package/frequent_questions/de/domain_routing.md +1 -2
- package/frequent_questions/de/esbuild_error.md +1 -2
- package/frequent_questions/de/get_locale_cookie.md +1 -2
- package/frequent_questions/de/intlayer_command_undefined.md +1 -2
- package/frequent_questions/de/locale_incorect_in_url.md +1 -2
- package/frequent_questions/de/static_rendering.md +1 -3
- package/frequent_questions/de/translated_path_url.md +1 -2
- package/frequent_questions/de/unknown_command.md +1 -2
- package/frequent_questions/en/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/en/array_as_content_declaration.md +1 -2
- package/frequent_questions/en/build_dictionaries.md +1 -2
- package/frequent_questions/en/build_error_CI_CD.md +1 -2
- package/frequent_questions/en/bun_set_up.md +1 -2
- package/frequent_questions/en/customized_locale_list.md +1 -2
- package/frequent_questions/en/domain_routing.md +1 -2
- package/frequent_questions/en/esbuild_error.md +1 -2
- package/frequent_questions/en/get_locale_cookie.md +1 -2
- package/frequent_questions/en/intlayer_command_undefined.md +1 -2
- package/frequent_questions/en/locale_incorect_in_url.md +1 -2
- package/frequent_questions/en/static_rendering.md +1 -3
- package/frequent_questions/en/translated_path_url.md +1 -2
- package/frequent_questions/en/unknown_command.md +1 -2
- package/frequent_questions/en-GB/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/en-GB/array_as_content_declaration.md +1 -2
- package/frequent_questions/en-GB/build_dictionaries.md +1 -2
- package/frequent_questions/en-GB/build_error_CI_CD.md +1 -2
- package/frequent_questions/en-GB/bun_set_up.md +1 -2
- package/frequent_questions/en-GB/customized_locale_list.md +1 -2
- package/frequent_questions/en-GB/domain_routing.md +1 -2
- package/frequent_questions/en-GB/esbuild_error.md +1 -2
- package/frequent_questions/en-GB/get_locale_cookie.md +1 -2
- package/frequent_questions/en-GB/intlayer_command_undefined.md +1 -2
- package/frequent_questions/en-GB/locale_incorect_in_url.md +1 -2
- package/frequent_questions/en-GB/static_rendering.md +1 -3
- package/frequent_questions/en-GB/translated_path_url.md +1 -2
- package/frequent_questions/en-GB/unknown_command.md +1 -2
- package/frequent_questions/es/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/es/array_as_content_declaration.md +1 -2
- package/frequent_questions/es/build_dictionaries.md +1 -2
- package/frequent_questions/es/build_error_CI_CD.md +1 -2
- package/frequent_questions/es/bun_set_up.md +1 -2
- package/frequent_questions/es/customized_locale_list.md +1 -2
- package/frequent_questions/es/domain_routing.md +1 -2
- package/frequent_questions/es/esbuild_error.md +1 -2
- package/frequent_questions/es/get_locale_cookie.md +1 -2
- package/frequent_questions/es/intlayer_command_undefined.md +1 -2
- package/frequent_questions/es/locale_incorect_in_url.md +1 -2
- package/frequent_questions/es/static_rendering.md +1 -3
- package/frequent_questions/es/translated_path_url.md +1 -2
- package/frequent_questions/es/unknown_command.md +1 -2
- package/frequent_questions/fr/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/fr/array_as_content_declaration.md +1 -2
- package/frequent_questions/fr/build_dictionaries.md +1 -2
- package/frequent_questions/fr/build_error_CI_CD.md +1 -2
- package/frequent_questions/fr/bun_set_up.md +1 -2
- package/frequent_questions/fr/customized_locale_list.md +1 -2
- package/frequent_questions/fr/domain_routing.md +1 -2
- package/frequent_questions/fr/esbuild_error.md +1 -2
- package/frequent_questions/fr/get_locale_cookie.md +1 -2
- package/frequent_questions/fr/intlayer_command_undefined.md +1 -2
- package/frequent_questions/fr/locale_incorect_in_url.md +1 -2
- package/frequent_questions/fr/static_rendering.md +1 -3
- package/frequent_questions/fr/translated_path_url.md +1 -2
- package/frequent_questions/fr/unknown_command.md +1 -2
- package/frequent_questions/hi/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/hi/array_as_content_declaration.md +1 -2
- package/frequent_questions/hi/build_dictionaries.md +1 -2
- package/frequent_questions/hi/build_error_CI_CD.md +1 -2
- package/frequent_questions/hi/bun_set_up.md +1 -2
- package/frequent_questions/hi/customized_locale_list.md +1 -2
- package/frequent_questions/hi/domain_routing.md +1 -2
- package/frequent_questions/hi/esbuild_error.md +1 -2
- package/frequent_questions/hi/get_locale_cookie.md +1 -2
- package/frequent_questions/hi/intlayer_command_undefined.md +1 -2
- package/frequent_questions/hi/locale_incorect_in_url.md +1 -2
- package/frequent_questions/hi/static_rendering.md +1 -3
- package/frequent_questions/hi/translated_path_url.md +1 -2
- package/frequent_questions/hi/unknown_command.md +1 -2
- package/frequent_questions/id/SSR_Next_no_[locale].md +104 -0
- package/frequent_questions/id/array_as_content_declaration.md +71 -0
- package/frequent_questions/id/build_dictionaries.md +58 -0
- package/frequent_questions/id/build_error_CI_CD.md +74 -0
- package/frequent_questions/id/bun_set_up.md +53 -0
- package/frequent_questions/id/customized_locale_list.md +64 -0
- package/frequent_questions/id/domain_routing.md +113 -0
- package/frequent_questions/id/esbuild_error.md +29 -0
- package/frequent_questions/id/get_locale_cookie.md +142 -0
- package/frequent_questions/id/intlayer_command_undefined.md +155 -0
- package/frequent_questions/id/locale_incorect_in_url.md +73 -0
- package/frequent_questions/id/static_rendering.md +44 -0
- package/frequent_questions/id/translated_path_url.md +55 -0
- package/frequent_questions/id/unknown_command.md +97 -0
- package/frequent_questions/it/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/it/array_as_content_declaration.md +1 -2
- package/frequent_questions/it/build_dictionaries.md +1 -2
- package/frequent_questions/it/build_error_CI_CD.md +1 -2
- package/frequent_questions/it/bun_set_up.md +1 -2
- package/frequent_questions/it/customized_locale_list.md +1 -2
- package/frequent_questions/it/domain_routing.md +1 -2
- package/frequent_questions/it/esbuild_error.md +1 -2
- package/frequent_questions/it/get_locale_cookie.md +1 -2
- package/frequent_questions/it/intlayer_command_undefined.md +1 -2
- package/frequent_questions/it/locale_incorect_in_url.md +1 -2
- package/frequent_questions/it/static_rendering.md +1 -3
- package/frequent_questions/it/translated_path_url.md +1 -2
- package/frequent_questions/it/unknown_command.md +1 -2
- package/frequent_questions/ja/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ja/array_as_content_declaration.md +1 -2
- package/frequent_questions/ja/build_dictionaries.md +1 -2
- package/frequent_questions/ja/build_error_CI_CD.md +1 -2
- package/frequent_questions/ja/bun_set_up.md +1 -2
- package/frequent_questions/ja/customized_locale_list.md +1 -2
- package/frequent_questions/ja/domain_routing.md +1 -2
- package/frequent_questions/ja/esbuild_error.md +1 -2
- package/frequent_questions/ja/get_locale_cookie.md +1 -2
- package/frequent_questions/ja/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ja/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ja/static_rendering.md +1 -3
- package/frequent_questions/ja/translated_path_url.md +1 -2
- package/frequent_questions/ja/unknown_command.md +1 -2
- package/frequent_questions/ko/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ko/array_as_content_declaration.md +1 -2
- package/frequent_questions/ko/build_dictionaries.md +1 -2
- package/frequent_questions/ko/build_error_CI_CD.md +1 -2
- package/frequent_questions/ko/bun_set_up.md +1 -2
- package/frequent_questions/ko/customized_locale_list.md +1 -2
- package/frequent_questions/ko/domain_routing.md +1 -2
- package/frequent_questions/ko/esbuild_error.md +1 -2
- package/frequent_questions/ko/get_locale_cookie.md +1 -2
- package/frequent_questions/ko/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ko/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ko/static_rendering.md +1 -3
- package/frequent_questions/ko/translated_path_url.md +1 -2
- package/frequent_questions/ko/unknown_command.md +1 -2
- package/frequent_questions/pl/SSR_Next_no_[locale].md +104 -0
- package/frequent_questions/pl/array_as_content_declaration.md +71 -0
- package/frequent_questions/pl/build_dictionaries.md +58 -0
- package/frequent_questions/pl/build_error_CI_CD.md +74 -0
- package/frequent_questions/pl/bun_set_up.md +54 -0
- package/frequent_questions/pl/customized_locale_list.md +64 -0
- package/frequent_questions/pl/domain_routing.md +113 -0
- package/frequent_questions/pl/esbuild_error.md +29 -0
- package/frequent_questions/pl/get_locale_cookie.md +142 -0
- package/frequent_questions/pl/intlayer_command_undefined.md +155 -0
- package/frequent_questions/pl/locale_incorect_in_url.md +73 -0
- package/frequent_questions/pl/static_rendering.md +44 -0
- package/frequent_questions/pl/translated_path_url.md +55 -0
- package/frequent_questions/pl/unknown_command.md +97 -0
- package/frequent_questions/pt/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/pt/array_as_content_declaration.md +1 -2
- package/frequent_questions/pt/build_dictionaries.md +1 -2
- package/frequent_questions/pt/build_error_CI_CD.md +1 -2
- package/frequent_questions/pt/bun_set_up.md +1 -2
- package/frequent_questions/pt/customized_locale_list.md +1 -2
- package/frequent_questions/pt/domain_routing.md +1 -2
- package/frequent_questions/pt/esbuild_error.md +1 -2
- package/frequent_questions/pt/get_locale_cookie.md +1 -2
- package/frequent_questions/pt/intlayer_command_undefined.md +1 -2
- package/frequent_questions/pt/locale_incorect_in_url.md +1 -2
- package/frequent_questions/pt/static_rendering.md +1 -3
- package/frequent_questions/pt/translated_path_url.md +1 -2
- package/frequent_questions/pt/unknown_command.md +1 -2
- package/frequent_questions/ru/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/ru/array_as_content_declaration.md +1 -2
- package/frequent_questions/ru/build_dictionaries.md +1 -2
- package/frequent_questions/ru/build_error_CI_CD.md +1 -2
- package/frequent_questions/ru/bun_set_up.md +1 -2
- package/frequent_questions/ru/customized_locale_list.md +1 -2
- package/frequent_questions/ru/domain_routing.md +1 -2
- package/frequent_questions/ru/esbuild_error.md +1 -2
- package/frequent_questions/ru/get_locale_cookie.md +1 -2
- package/frequent_questions/ru/intlayer_command_undefined.md +1 -2
- package/frequent_questions/ru/locale_incorect_in_url.md +1 -2
- package/frequent_questions/ru/static_rendering.md +1 -2
- package/frequent_questions/ru/translated_path_url.md +1 -2
- package/frequent_questions/ru/unknown_command.md +1 -2
- package/frequent_questions/tr/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/tr/array_as_content_declaration.md +1 -2
- package/frequent_questions/tr/build_dictionaries.md +1 -2
- package/frequent_questions/tr/build_error_CI_CD.md +1 -2
- package/frequent_questions/tr/bun_set_up.md +1 -2
- package/frequent_questions/tr/customized_locale_list.md +1 -2
- package/frequent_questions/tr/domain_routing.md +1 -2
- package/frequent_questions/tr/esbuild_error.md +1 -2
- package/frequent_questions/tr/get_locale_cookie.md +1 -2
- package/frequent_questions/tr/intlayer_command_undefined.md +1 -2
- package/frequent_questions/tr/locale_incorect_in_url.md +1 -2
- package/frequent_questions/tr/static_rendering.md +1 -2
- package/frequent_questions/tr/translated_path_url.md +1 -2
- package/frequent_questions/tr/unknown_command.md +1 -2
- package/frequent_questions/vi/SSR_Next_no_[locale].md +106 -0
- package/frequent_questions/vi/array_as_content_declaration.md +71 -0
- package/frequent_questions/vi/build_dictionaries.md +58 -0
- package/frequent_questions/vi/build_error_CI_CD.md +74 -0
- package/frequent_questions/vi/bun_set_up.md +53 -0
- package/frequent_questions/vi/customized_locale_list.md +64 -0
- package/frequent_questions/vi/domain_routing.md +113 -0
- package/frequent_questions/vi/esbuild_error.md +29 -0
- package/frequent_questions/vi/get_locale_cookie.md +142 -0
- package/frequent_questions/vi/intlayer_command_undefined.md +155 -0
- package/frequent_questions/vi/locale_incorect_in_url.md +73 -0
- package/frequent_questions/vi/static_rendering.md +44 -0
- package/frequent_questions/vi/translated_path_url.md +55 -0
- package/frequent_questions/vi/unknown_command.md +97 -0
- package/frequent_questions/zh/SSR_Next_no_[locale].md +1 -2
- package/frequent_questions/zh/array_as_content_declaration.md +1 -2
- package/frequent_questions/zh/build_dictionaries.md +1 -2
- package/frequent_questions/zh/build_error_CI_CD.md +1 -2
- package/frequent_questions/zh/bun_set_up.md +1 -2
- package/frequent_questions/zh/customized_locale_list.md +1 -2
- package/frequent_questions/zh/domain_routing.md +1 -2
- package/frequent_questions/zh/esbuild_error.md +1 -2
- package/frequent_questions/zh/get_locale_cookie.md +1 -2
- package/frequent_questions/zh/intlayer_command_undefined.md +1 -2
- package/frequent_questions/zh/locale_incorect_in_url.md +1 -2
- package/frequent_questions/zh/static_rendering.md +1 -3
- package/frequent_questions/zh/translated_path_url.md +1 -2
- package/frequent_questions/zh/unknown_command.md +1 -2
- package/legal/id/privacy_notice.md +83 -0
- package/legal/id/terms_of_service.md +55 -0
- package/legal/pl/privacy_notice.md +83 -0
- package/legal/pl/terms_of_service.md +55 -0
- package/legal/vi/privacy_notice.md +83 -0
- package/legal/vi/terms_of_service.md +55 -0
- package/package.json +19 -18
- package/src/generated/blog.entry.ts +38 -0
|
@@ -0,0 +1,1092 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-02-07
|
|
3
|
+
updatedAt: 2025-09-20
|
|
4
|
+
title: Berkas Konten
|
|
5
|
+
description: Pelajari cara menyesuaikan ekstensi untuk berkas deklarasi konten Anda. Ikuti dokumentasi ini untuk mengimplementasikan kondisi secara efisien dalam proyek Anda.
|
|
6
|
+
keywords:
|
|
7
|
+
- Berkas Konten
|
|
8
|
+
- Dokumentasi
|
|
9
|
+
- Intlayer
|
|
10
|
+
slugs:
|
|
11
|
+
- doc
|
|
12
|
+
- concept
|
|
13
|
+
- content
|
|
14
|
+
history:
|
|
15
|
+
- version: 7.0.0
|
|
16
|
+
date: 2025-10-23
|
|
17
|
+
changes: Mengganti nama `autoFill` menjadi `fill`
|
|
18
|
+
- version: 6.0.0
|
|
19
|
+
date: 2025-09-20
|
|
20
|
+
changes: Menambahkan dokumentasi fields
|
|
21
|
+
- version: 5.5.10
|
|
22
|
+
date: 2025-06-29
|
|
23
|
+
changes: Memulai riwayat
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Berkas Konten
|
|
27
|
+
|
|
28
|
+
<iframe title="i18n, Markdown, JSON… satu solusi untuk mengelola semuanya | Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/1VHgSY_j9_I?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
29
|
+
|
|
30
|
+
## Apa itu Berkas Konten?
|
|
31
|
+
|
|
32
|
+
Berkas konten dalam Intlayer adalah berkas yang berisi definisi kamus.
|
|
33
|
+
Berkas-berkas ini mendeklarasikan konten teks aplikasi Anda, terjemahan, dan sumber daya.
|
|
34
|
+
Berkas konten diproses oleh Intlayer untuk menghasilkan kamus.
|
|
35
|
+
|
|
36
|
+
Kamus-kamus tersebut akan menjadi hasil akhir yang akan diimpor oleh aplikasi Anda menggunakan hook `useIntlayer`.
|
|
37
|
+
|
|
38
|
+
### Konsep Utama
|
|
39
|
+
|
|
40
|
+
#### Kamus
|
|
41
|
+
|
|
42
|
+
Sebuah kamus adalah kumpulan konten yang terstruktur dan diorganisir berdasarkan kunci. Setiap kamus berisi:
|
|
43
|
+
|
|
44
|
+
- **Key**: Identifier unik untuk kamus tersebut
|
|
45
|
+
- **Content**: Nilai konten sebenarnya (teks, angka, objek, dll.)
|
|
46
|
+
- **Metadata**: Informasi tambahan seperti judul, deskripsi, tag, dll.
|
|
47
|
+
|
|
48
|
+
#### Berkas Konten
|
|
49
|
+
|
|
50
|
+
Contoh berkas konten:
|
|
51
|
+
|
|
52
|
+
```tsx fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
|
|
53
|
+
import { type ReactNode } from "react";
|
|
54
|
+
import {
|
|
55
|
+
t,
|
|
56
|
+
enu,
|
|
57
|
+
cond,
|
|
58
|
+
nest,
|
|
59
|
+
md,
|
|
60
|
+
insert,
|
|
61
|
+
file,
|
|
62
|
+
type Dictionary,
|
|
63
|
+
} from "intlayer";
|
|
64
|
+
|
|
65
|
+
interface Content {
|
|
66
|
+
imbricatedContent: {
|
|
67
|
+
imbricatedContent2: {
|
|
68
|
+
stringContent: string;
|
|
69
|
+
numberContent: number;
|
|
70
|
+
booleanContent: boolean;
|
|
71
|
+
javaScriptContent: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
multilingualContent: string;
|
|
75
|
+
quantityContent: string;
|
|
76
|
+
conditionalContent: string;
|
|
77
|
+
markdownContent: never;
|
|
78
|
+
externalContent: string;
|
|
79
|
+
insertionContent: string;
|
|
80
|
+
nestedContent: string;
|
|
81
|
+
fileContent: string;
|
|
82
|
+
jsxContent: ReactNode;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export default {
|
|
86
|
+
key: "page",
|
|
87
|
+
content: {
|
|
88
|
+
imbricatedContent: {
|
|
89
|
+
imbricatedContent2: {
|
|
90
|
+
stringContent: "Halo Dunia",
|
|
91
|
+
numberContent: 123,
|
|
92
|
+
booleanContent: true,
|
|
93
|
+
javaScriptContent: `${process.env.NODE_ENV}`,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
multilingualContent: t({
|
|
97
|
+
en: "English content",
|
|
98
|
+
"en-GB": "English content (UK)",
|
|
99
|
+
fr: "French content",
|
|
100
|
+
es: "Spanish content",
|
|
101
|
+
}),
|
|
102
|
+
quantityContent: enu({
|
|
103
|
+
"<-1": "Kurang dari minus satu mobil",
|
|
104
|
+
"-1": "Minus satu mobil",
|
|
105
|
+
"0": "Tidak ada mobil",
|
|
106
|
+
"1": "Satu mobil",
|
|
107
|
+
">5": "Beberapa mobil",
|
|
108
|
+
">19": "Banyak mobil",
|
|
109
|
+
}),
|
|
110
|
+
conditionalContent: cond({
|
|
111
|
+
true: "Validasi diaktifkan",
|
|
112
|
+
false: "Validasi dinonaktifkan",
|
|
113
|
+
}),
|
|
114
|
+
insertionContent: insert("Halo {{name}}!"),
|
|
115
|
+
nestedContent: nest(
|
|
116
|
+
"navbar", // Kunci dari kamus yang akan disisipkan
|
|
117
|
+
"login.button" // [Opsional] Jalur ke konten yang akan disisipkan
|
|
118
|
+
),
|
|
119
|
+
fileContent: file("./path/to/file.txt"),
|
|
120
|
+
externalContent: fetch("https://example.com").then((res) => res.json()),
|
|
121
|
+
markdownContent: md("# Contoh Markdown"),
|
|
122
|
+
|
|
123
|
+
/*
|
|
124
|
+
* Hanya tersedia menggunakan `react-intlayer` atau `next-intlayer`
|
|
125
|
+
*/
|
|
126
|
+
jsxContent: <h1>Judul saya</h1>,
|
|
127
|
+
},
|
|
128
|
+
} satisfies Dictionary<Content>; // [opsional] Dictionary adalah generic dan memungkinkan Anda memperkuat format kamus Anda
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
|
|
132
|
+
import { t, enu, cond, nest, md, insert, file } from "intlayer";
|
|
133
|
+
|
|
134
|
+
/** @type {import('intlayer').Dictionary} */
|
|
135
|
+
export default {
|
|
136
|
+
key: "page",
|
|
137
|
+
content: {
|
|
138
|
+
imbricatedContent: {
|
|
139
|
+
imbricatedContent2: {
|
|
140
|
+
stringContent: "Halo Dunia",
|
|
141
|
+
numberContent: 123,
|
|
142
|
+
booleanContent: true,
|
|
143
|
+
javaScriptContent: `${process.env.NODE_ENV}`, // Lingkungan Node.js saat ini
|
|
144
|
+
},
|
|
145
|
+
imbricatedArray: [1, 2, 3],
|
|
146
|
+
},
|
|
147
|
+
multilingualContent: t({
|
|
148
|
+
en: "English content",
|
|
149
|
+
"en-GB": "English content (UK)",
|
|
150
|
+
fr: "French content",
|
|
151
|
+
es: "Spanish content",
|
|
152
|
+
}),
|
|
153
|
+
quantityContent: enu({
|
|
154
|
+
"<-1": "Kurang dari minus satu mobil",
|
|
155
|
+
"-1": "Minus satu mobil",
|
|
156
|
+
"0": "Tidak ada mobil",
|
|
157
|
+
"1": "Satu mobil",
|
|
158
|
+
">5": "Beberapa mobil",
|
|
159
|
+
">19": "Banyak mobil",
|
|
160
|
+
}),
|
|
161
|
+
conditionalContent: cond({
|
|
162
|
+
true: "Validasi diaktifkan",
|
|
163
|
+
false: "Validasi dinonaktifkan",
|
|
164
|
+
}),
|
|
165
|
+
insertionContent: insert("Halo {{name}}!"),
|
|
166
|
+
nestedContent: nest(
|
|
167
|
+
"navbar", // Kunci dari kamus yang akan disisipkan
|
|
168
|
+
"login.button" // [Opsional] Jalur ke konten yang akan disisipkan
|
|
169
|
+
),
|
|
170
|
+
markdownContent: md("# Contoh Markdown"),
|
|
171
|
+
fileContent: file("./path/to/file.txt"),
|
|
172
|
+
externalContent: fetch("https://example.com").then((res) => res.json())
|
|
173
|
+
|
|
174
|
+
// Hanya tersedia menggunakan `react-intlayer` atau `next-intlayer`
|
|
175
|
+
jsxContent: <h1>Judul saya</h1>,
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
|
|
181
|
+
const { t, enu, cond, nest, md, insert, file } = require("intlayer");
|
|
182
|
+
|
|
183
|
+
/** @type {import('intlayer').Dictionary} */
|
|
184
|
+
module.exports = {
|
|
185
|
+
key: "page",
|
|
186
|
+
content: {
|
|
187
|
+
imbricatedContent: {
|
|
188
|
+
imbricatedContent2: {
|
|
189
|
+
stringContent: "Halo Dunia",
|
|
190
|
+
numberContent: 123,
|
|
191
|
+
booleanContent: true,
|
|
192
|
+
javaScriptContent: `${process.env.NODE_ENV}`, // Konten JavaScript dari variabel lingkungan
|
|
193
|
+
},
|
|
194
|
+
imbricatedArray: [1, 2, 3],
|
|
195
|
+
},
|
|
196
|
+
multilingualContent: t({
|
|
197
|
+
en: "English content",
|
|
198
|
+
"en-GB": "English content (UK)",
|
|
199
|
+
fr: "French content",
|
|
200
|
+
es: "Spanish content",
|
|
201
|
+
}),
|
|
202
|
+
quantityContent: enu({
|
|
203
|
+
"<-1": "Kurang dari minus satu mobil",
|
|
204
|
+
"-1": "Minus satu mobil",
|
|
205
|
+
"0": "Tidak ada mobil",
|
|
206
|
+
"1": "Satu mobil",
|
|
207
|
+
">5": "Beberapa mobil",
|
|
208
|
+
">19": "Banyak mobil",
|
|
209
|
+
}),
|
|
210
|
+
conditionalContent: cond({
|
|
211
|
+
true: "Validasi diaktifkan",
|
|
212
|
+
false: "Validasi dinonaktifkan",
|
|
213
|
+
}),
|
|
214
|
+
insertionContent: insert("Halo {{name}}!"),
|
|
215
|
+
nestedContent: nest(
|
|
216
|
+
"navbar", // Kunci dari kamus yang akan disisipkan
|
|
217
|
+
"login.button" // [Opsional] Jalur ke konten yang akan disisipkan
|
|
218
|
+
),
|
|
219
|
+
markdownContent: md("# Contoh Markdown"),
|
|
220
|
+
fileContent: file("./path/to/file.txt"),
|
|
221
|
+
externalContent: fetch("https://example.com").then((res) => res.json())
|
|
222
|
+
|
|
223
|
+
// Hanya tersedia menggunakan `react-intlayer` atau `next-intlayer`
|
|
224
|
+
jsxContent: <h1>Judul Saya</h1>,
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
|
|
230
|
+
{
|
|
231
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
232
|
+
"key": "page",
|
|
233
|
+
"content": {
|
|
234
|
+
"imbricatedContent": {
|
|
235
|
+
"imbricatedContent2": {
|
|
236
|
+
"stringContent": "Halo Dunia",
|
|
237
|
+
"numberContent": 123,
|
|
238
|
+
"booleanContent": true,
|
|
239
|
+
},
|
|
240
|
+
"imbricatedArray": [1, 2, 3],
|
|
241
|
+
},
|
|
242
|
+
"multilingualContent": {
|
|
243
|
+
"nodeType": "translation",
|
|
244
|
+
"translation": {
|
|
245
|
+
"en": "Konten bahasa Inggris",
|
|
246
|
+
"en-GB": "Konten bahasa Inggris (UK)",
|
|
247
|
+
"fr": "Konten bahasa Perancis",
|
|
248
|
+
"es": "Konten bahasa Spanyol",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
"quantityContent": {
|
|
252
|
+
"nodeType": "enumeration",
|
|
253
|
+
"enumeration": {
|
|
254
|
+
"0": "Tidak ada mobil",
|
|
255
|
+
"1": "Satu mobil",
|
|
256
|
+
"<-1": "Kurang dari minus satu mobil",
|
|
257
|
+
"-1": "Minus satu mobil",
|
|
258
|
+
">5": "Beberapa mobil",
|
|
259
|
+
">19": "Banyak mobil",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
"conditionalContent": {
|
|
263
|
+
"nodeType": "condition",
|
|
264
|
+
"condition": {
|
|
265
|
+
"true": "Validasi diaktifkan",
|
|
266
|
+
"false": "Validasi dinonaktifkan",
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
"insertionContent": {
|
|
270
|
+
"nodeType": "insertion",
|
|
271
|
+
"insertion": "Halo {{name}}!",
|
|
272
|
+
},
|
|
273
|
+
"nestedContent": {
|
|
274
|
+
"nodeType": "nested",
|
|
275
|
+
"nested": { "dictionaryKey": "app" },
|
|
276
|
+
},
|
|
277
|
+
"markdownContent": {
|
|
278
|
+
"nodeType": "markdown",
|
|
279
|
+
"markdown": "# Contoh Markdown",
|
|
280
|
+
},
|
|
281
|
+
"fileContent": {
|
|
282
|
+
"nodeType": "file",
|
|
283
|
+
"file": "./path/to/file.txt",
|
|
284
|
+
},
|
|
285
|
+
"jsxContent": {
|
|
286
|
+
"type": "h1",
|
|
287
|
+
"key": null,
|
|
288
|
+
"ref": null,
|
|
289
|
+
"props": {
|
|
290
|
+
"children": ["Judul saya"],
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
#### Content Nodes
|
|
298
|
+
|
|
299
|
+
Content nodes adalah blok bangunan dari konten kamus. Mereka dapat berupa:
|
|
300
|
+
|
|
301
|
+
- **Nilai primitif**: string, angka, boolean, null, undefined
|
|
302
|
+
- **Node bertipe**: Jenis konten khusus seperti terjemahan, kondisi, markdown, dll.
|
|
303
|
+
- **Fungsi**: Konten dinamis yang dapat dievaluasi saat runtime [lihat Pengambilan Fungsi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/function_fetching.md)
|
|
304
|
+
- **Konten bersarang**: Referensi ke kamus lain
|
|
305
|
+
|
|
306
|
+
#### Jenis Konten
|
|
307
|
+
|
|
308
|
+
Intlayer mendukung berbagai jenis konten melalui node bertipe:
|
|
309
|
+
|
|
310
|
+
- **Konten Terjemahan**: Teks multibahasa dengan nilai spesifik lokal [lihat Konten Terjemahan](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/translation_content.md)
|
|
311
|
+
- **Konten Kondisi**: Konten kondisional berdasarkan ekspresi boolean [lihat Konten Kondisi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/condition_content.md)
|
|
312
|
+
- **Konten Enumerasi**: Konten yang bervariasi berdasarkan nilai enumerasi [lihat Konten Enumerasi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/enumeration_content.md)
|
|
313
|
+
- **Konten Penyisipan**: Konten yang dapat disisipkan ke dalam konten lain [lihat Konten Penyisipan](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/insertion_content.md)
|
|
314
|
+
- **Konten Markdown**: Konten teks kaya dalam format Markdown [lihat Konten Markdown](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/markdown_content.md)
|
|
315
|
+
- **Konten Bersarang**: Referensi ke kamus lain [lihat Konten Bersarang](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/nested_content.md)
|
|
316
|
+
- **Konten Gender**: Konten yang bervariasi berdasarkan gender [lihat Konten Gender](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/gender_content.md)
|
|
317
|
+
- **Konten File**: Referensi ke file eksternal [lihat Konten File](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/file_content.md)
|
|
318
|
+
|
|
319
|
+
## Struktur Kamus
|
|
320
|
+
|
|
321
|
+
Sebuah kamus dalam Intlayer didefinisikan oleh tipe `Dictionary` dan berisi beberapa properti yang mengontrol perilakunya:
|
|
322
|
+
|
|
323
|
+
### Properti Wajib
|
|
324
|
+
|
|
325
|
+
#### `key` (string)
|
|
326
|
+
|
|
327
|
+
Pengidentifikasi untuk kamus. Jika beberapa kamus memiliki kunci yang sama, Intlayer akan menggabungkannya secara otomatis.
|
|
328
|
+
|
|
329
|
+
> Gunakan konvensi penamaan kebab-case (misalnya, `"about-page-meta"`).
|
|
330
|
+
|
|
331
|
+
#### Content (string | number | boolean | object | array | function)
|
|
332
|
+
|
|
333
|
+
Properti `content` berisi data kamus yang sebenarnya dan mendukung:
|
|
334
|
+
|
|
335
|
+
- **Nilai primitif**: string, angka, boolean, null, undefined
|
|
336
|
+
- **Typed nodes**: Jenis konten khusus menggunakan fungsi pembantu Intlayer
|
|
337
|
+
- **Objek bersarang**: Struktur data kompleks
|
|
338
|
+
- **Array**: Koleksi konten
|
|
339
|
+
- **Fungsi**: Evaluasi konten dinamis
|
|
340
|
+
|
|
341
|
+
### Properti Opsional
|
|
342
|
+
|
|
343
|
+
#### `title` (string)
|
|
344
|
+
|
|
345
|
+
Judul yang mudah dibaca untuk kamus yang membantu mengidentifikasinya di editor dan sistem CMS. Ini sangat berguna saat mengelola sejumlah besar kamus atau saat bekerja dengan antarmuka manajemen konten.
|
|
346
|
+
|
|
347
|
+
**Contoh:**
|
|
348
|
+
|
|
349
|
+
```typescript
|
|
350
|
+
{
|
|
351
|
+
key: "about-page-meta",
|
|
352
|
+
title: "Metadata Halaman Tentang",
|
|
353
|
+
content: { /* ... */ }
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
#### `description` (string)
|
|
358
|
+
|
|
359
|
+
Deskripsi rinci yang menjelaskan tujuan kamus, panduan penggunaan, dan pertimbangan khusus lainnya. Deskripsi ini juga digunakan sebagai konteks untuk pembuatan terjemahan berbasis AI, sehingga sangat berharga untuk menjaga kualitas dan konsistensi terjemahan.
|
|
360
|
+
|
|
361
|
+
**Contoh:**
|
|
362
|
+
|
|
363
|
+
```typescript
|
|
364
|
+
{
|
|
365
|
+
key: "about-page-meta",
|
|
366
|
+
description: [
|
|
367
|
+
"Kamus ini mengelola metadata dari Halaman Tentang",
|
|
368
|
+
"Pertimbangkan praktik terbaik untuk SEO:",
|
|
369
|
+
"- Judul harus antara 50 dan 60 karakter",
|
|
370
|
+
"- Deskripsi harus antara 150 dan 160 karakter",
|
|
371
|
+
].join('\n'),
|
|
372
|
+
content: { /* ... */ }
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
#### `tags` (string[])
|
|
377
|
+
|
|
378
|
+
Array string untuk mengkategorikan dan mengorganisir kamus. Tag memberikan konteks tambahan dan dapat digunakan untuk penyaringan, pencarian, atau pengorganisasian kamus di editor dan sistem CMS.
|
|
379
|
+
|
|
380
|
+
**Contoh:**
|
|
381
|
+
|
|
382
|
+
```typescript
|
|
383
|
+
{
|
|
384
|
+
key: "about-page-meta",
|
|
385
|
+
tags: ["metadata", "about-page", "seo"],
|
|
386
|
+
content: { /* ... */ }
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
#### `locale` (LocalesValues)
|
|
391
|
+
|
|
392
|
+
Mengubah kamus menjadi kamus per-locale di mana setiap field yang dideklarasikan dalam konten akan secara otomatis diubah menjadi node terjemahan. Ketika properti ini diatur:
|
|
393
|
+
|
|
394
|
+
- Kamus diperlakukan sebagai kamus satu-lokasi
|
|
395
|
+
- Setiap field menjadi node terjemahan untuk lokasi spesifik tersebut
|
|
396
|
+
- Anda TIDAK boleh menggunakan node terjemahan (`t()`) dalam konten saat menggunakan properti ini
|
|
397
|
+
- Jika tidak ada, kamus akan diperlakukan sebagai kamus multibahasa
|
|
398
|
+
|
|
399
|
+
> Lihat [Deklarasi Konten Per-Lokasi di Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/per_locale_file.md) untuk informasi lebih lanjut.
|
|
400
|
+
|
|
401
|
+
**Contoh:**
|
|
402
|
+
|
|
403
|
+
```json
|
|
404
|
+
// Kamus per-lokasi
|
|
405
|
+
{
|
|
406
|
+
"key": "about-page",
|
|
407
|
+
"locale": "en",
|
|
408
|
+
"content": {
|
|
409
|
+
"title": "About Us", // Ini menjadi node terjemahan untuk 'en'
|
|
410
|
+
"description": "Learn more about our company"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
#### `fill` (Fill)
|
|
416
|
+
|
|
417
|
+
Instruksi untuk mengisi konten kamus secara otomatis dari sumber eksternal. Ini dapat dikonfigurasi secara global di `intlayer.config.ts` atau per kamus. Mendukung beberapa format:
|
|
418
|
+
|
|
419
|
+
- **`true`**: Mengaktifkan pengisian untuk semua lokasi
|
|
420
|
+
- **`false`**: Menonaktifkan pengisian untuk semua lokasi
|
|
421
|
+
- **`string`**: Jalur ke satu file atau template dengan variabel
|
|
422
|
+
- **`object`**: Jalur file per lokasi
|
|
423
|
+
|
|
424
|
+
**Contoh:**
|
|
425
|
+
|
|
426
|
+
```json
|
|
427
|
+
// Menonaktifkan pengisian
|
|
428
|
+
{
|
|
429
|
+
"fill": false
|
|
430
|
+
}
|
|
431
|
+
// Satu file
|
|
432
|
+
{
|
|
433
|
+
"fill": "./translations/aboutPage.content.json"
|
|
434
|
+
}
|
|
435
|
+
// Template dengan variabel
|
|
436
|
+
{
|
|
437
|
+
"fill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
|
|
438
|
+
}
|
|
439
|
+
// Konfigurasi per-lokasi yang detail
|
|
440
|
+
{
|
|
441
|
+
"fill": {
|
|
442
|
+
"en": "./translations/en/aboutPage.content.json",
|
|
443
|
+
"fr": "./translations/fr/aboutPage.content.json",
|
|
444
|
+
"es": "./translations/es/aboutPage.content.json"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Variabel yang tersedia:**
|
|
450
|
+
|
|
451
|
+
- `{{locale}}` – Kode locale (misal `fr`, `es`)
|
|
452
|
+
- `{{fileName}}` – Nama file (misal `example`)
|
|
453
|
+
- `{{key}}` – Kunci kamus (misal `example`)
|
|
454
|
+
|
|
455
|
+
> Lihat [Konfigurasi Auto-Fill di Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/fill.md) untuk informasi lebih lanjut.
|
|
456
|
+
|
|
457
|
+
##### `priority` (number)
|
|
458
|
+
|
|
459
|
+
Menunjukkan prioritas kamus untuk penyelesaian konflik. Ketika beberapa kamus memiliki kunci yang sama, kamus dengan nomor prioritas tertinggi akan menimpa yang lain. Ini berguna untuk mengelola hierarki konten dan override.
|
|
460
|
+
|
|
461
|
+
**Contoh:**
|
|
462
|
+
|
|
463
|
+
```typescript
|
|
464
|
+
// Kamus dasar
|
|
465
|
+
{
|
|
466
|
+
key: "welcome-message",
|
|
467
|
+
priority: 1,
|
|
468
|
+
content: { message: "Welcome!" }
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// Kamus override
|
|
472
|
+
{
|
|
473
|
+
key: "welcome-message",
|
|
474
|
+
priority: 10,
|
|
475
|
+
content: { message: "Selamat datang di layanan premium kami!" }
|
|
476
|
+
}
|
|
477
|
+
// Ini akan menimpa kamus dasar
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
### Properti CMS
|
|
481
|
+
|
|
482
|
+
##### `version` (string)
|
|
483
|
+
|
|
484
|
+
Pengidentifikasi versi untuk kamus jarak jauh. Membantu melacak versi kamus yang sedang digunakan, sangat berguna saat bekerja dengan sistem manajemen konten jarak jauh.
|
|
485
|
+
|
|
486
|
+
##### `live` (boolean)
|
|
487
|
+
|
|
488
|
+
Untuk kamus jarak jauh, menunjukkan apakah kamus harus diambil secara langsung saat runtime. Ketika diaktifkan:
|
|
489
|
+
|
|
490
|
+
- Membutuhkan `importMode` disetel ke "live" di `intlayer.config.ts`
|
|
491
|
+
- Membutuhkan server live yang berjalan
|
|
492
|
+
- Kamus akan diambil saat runtime menggunakan API sinkronisasi langsung
|
|
493
|
+
- Jika live tetapi pengambilan gagal, akan kembali ke nilai dinamis
|
|
494
|
+
- Jika tidak live, kamus diubah pada saat build untuk performa optimal
|
|
495
|
+
|
|
496
|
+
### Properti Sistem (Otomatis Dibuat)
|
|
497
|
+
|
|
498
|
+
Properti ini dibuat secara otomatis oleh Intlayer dan tidak boleh dimodifikasi secara manual:
|
|
499
|
+
|
|
500
|
+
##### `$schema` (string)
|
|
501
|
+
|
|
502
|
+
Skema JSON yang digunakan untuk validasi struktur kamus. Ditambahkan secara otomatis oleh Intlayer untuk memastikan integritas kamus.
|
|
503
|
+
|
|
504
|
+
##### `id` (string)
|
|
505
|
+
|
|
506
|
+
Untuk kamus jarak jauh, ini adalah pengidentifikasi unik dari kamus di server jarak jauh. Digunakan untuk mengambil dan mengelola konten jarak jauh.
|
|
507
|
+
|
|
508
|
+
##### `projectIds` (string[])
|
|
509
|
+
|
|
510
|
+
Untuk kamus jarak jauh, array ini berisi ID proyek yang dapat menggunakan kamus ini. Kamus jarak jauh dapat dibagikan antara beberapa proyek.
|
|
511
|
+
|
|
512
|
+
##### `localId` (LocalDictionaryId)
|
|
513
|
+
|
|
514
|
+
Pengidentifikasi unik untuk kamus lokal. Dibuat secara otomatis oleh Intlayer untuk membantu mengidentifikasi kamus dan menentukan apakah itu lokal atau jarak jauh, beserta lokasinya.
|
|
515
|
+
|
|
516
|
+
##### `localIds` (LocalDictionaryId[])
|
|
517
|
+
|
|
518
|
+
Untuk kamus yang digabung, array ini berisi ID dari semua kamus yang digabungkan bersama. Berguna untuk melacak sumber konten yang digabung.
|
|
519
|
+
|
|
520
|
+
##### `filePath` (string)
|
|
521
|
+
|
|
522
|
+
Jalur file dari kamus lokal, menunjukkan dari file `.content` mana kamus tersebut dihasilkan. Membantu dalam debugging dan pelacakan sumber.
|
|
523
|
+
|
|
524
|
+
##### `versions` (string[])
|
|
525
|
+
|
|
526
|
+
Untuk kamus jarak jauh, array ini berisi semua versi kamus yang tersedia. Membantu melacak versi mana yang tersedia untuk digunakan.
|
|
527
|
+
|
|
528
|
+
##### `filled` (true)
|
|
529
|
+
|
|
530
|
+
Menunjukkan apakah kamus telah diisi otomatis dari sumber eksternal. Jika terjadi konflik, kamus dasar akan mengesampingkan kamus yang diisi otomatis.
|
|
531
|
+
|
|
532
|
+
##### `location` ('distant' | 'locale')
|
|
533
|
+
|
|
534
|
+
Menunjukkan lokasi kamus:
|
|
535
|
+
|
|
536
|
+
- `'locale'`: Kamus lokal (dari file konten)
|
|
537
|
+
- `'distant'`: Kamus jarak jauh (dari sumber eksternal)
|
|
538
|
+
|
|
539
|
+
## Jenis Node Konten
|
|
540
|
+
|
|
541
|
+
Intlayer menyediakan beberapa jenis node konten khusus yang memperluas nilai primitif dasar:
|
|
542
|
+
|
|
543
|
+
### Konten Terjemahan (`t`)
|
|
544
|
+
|
|
545
|
+
Konten multibahasa yang bervariasi berdasarkan locale:
|
|
546
|
+
|
|
547
|
+
```typescript
|
|
548
|
+
import { t } from "intlayer";
|
|
549
|
+
|
|
550
|
+
// TypeScript/JavaScript
|
|
551
|
+
multilingualContent: t({
|
|
552
|
+
en: "Welcome to our website",
|
|
553
|
+
fr: "Bienvenue sur notre site web",
|
|
554
|
+
es: "Bienvenido a nuestro sitio web",
|
|
555
|
+
});
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Konten Kondisi (`cond`)
|
|
559
|
+
|
|
560
|
+
Konten yang berubah berdasarkan kondisi boolean:
|
|
561
|
+
|
|
562
|
+
```typescript
|
|
563
|
+
import { cond } from "intlayer";
|
|
564
|
+
|
|
565
|
+
conditionalContent: cond({
|
|
566
|
+
true: "Pengguna telah masuk",
|
|
567
|
+
false: "Silakan masuk untuk melanjutkan",
|
|
568
|
+
});
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Konten Enumerasi (`enu`)
|
|
572
|
+
|
|
573
|
+
Konten yang bervariasi berdasarkan nilai enumerasi:
|
|
574
|
+
|
|
575
|
+
```typescript
|
|
576
|
+
import { enu } from "intlayer";
|
|
577
|
+
|
|
578
|
+
statusContent: enu({
|
|
579
|
+
pending: "Permintaan Anda sedang menunggu",
|
|
580
|
+
approved: "Permintaan Anda telah disetujui",
|
|
581
|
+
rejected: "Permintaan Anda telah ditolak",
|
|
582
|
+
});
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
### Konten Penyisipan (`insert`)
|
|
586
|
+
|
|
587
|
+
Konten yang dapat disisipkan ke dalam konten lain:
|
|
588
|
+
|
|
589
|
+
```typescript
|
|
590
|
+
import { insert } from "intlayer";
|
|
591
|
+
|
|
592
|
+
insertionContent: insert("Teks ini dapat disisipkan di mana saja");
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### Konten Bersarang (`nest`)
|
|
596
|
+
|
|
597
|
+
Referensi ke kamus lain:
|
|
598
|
+
|
|
599
|
+
```typescript
|
|
600
|
+
import { nest } from "intlayer";
|
|
601
|
+
|
|
602
|
+
nestedContent: nest("about-page");
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
### Konten Markdown (`md`)
|
|
606
|
+
|
|
607
|
+
Konten teks kaya dalam format Markdown:
|
|
608
|
+
|
|
609
|
+
```typescript
|
|
610
|
+
import { md } from "intlayer";
|
|
611
|
+
|
|
612
|
+
markdownContent: md(
|
|
613
|
+
"# Selamat Datang\n\nIni adalah teks **tebal** dengan [tautan](https://example.com)"
|
|
614
|
+
);
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
### Konten Gender (`gender`)
|
|
618
|
+
|
|
619
|
+
Konten yang bervariasi berdasarkan gender:
|
|
620
|
+
|
|
621
|
+
```typescript
|
|
622
|
+
import { gender } from "intlayer";
|
|
623
|
+
|
|
624
|
+
genderContent: gender({
|
|
625
|
+
male: "Dia adalah seorang pengembang",
|
|
626
|
+
female: "Dia adalah seorang pengembang",
|
|
627
|
+
other: "Mereka adalah seorang pengembang",
|
|
628
|
+
});
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Konten File (`file`)
|
|
632
|
+
|
|
633
|
+
Referensi ke file eksternal:
|
|
634
|
+
|
|
635
|
+
```typescript
|
|
636
|
+
import { file } from "intlayer";
|
|
637
|
+
|
|
638
|
+
fileContent: file("./path/to/content.txt");
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
## Membuat File Konten
|
|
642
|
+
|
|
643
|
+
### Struktur Dasar File Konten
|
|
644
|
+
|
|
645
|
+
A content file mengekspor objek default yang memenuhi tipe `Dictionary`:
|
|
646
|
+
|
|
647
|
+
```typescript
|
|
648
|
+
// example.content.ts
|
|
649
|
+
import { t, cond, nest, md, insert, file } from "intlayer";
|
|
650
|
+
|
|
651
|
+
export default {
|
|
652
|
+
key: "welcome-page",
|
|
653
|
+
title: "Konten Halaman Selamat Datang",
|
|
654
|
+
description:
|
|
655
|
+
"Konten untuk halaman utama selamat datang termasuk bagian hero dan fitur",
|
|
656
|
+
tags: ["page", "welcome", "homepage"],
|
|
657
|
+
content: {
|
|
658
|
+
hero: {
|
|
659
|
+
title: t({
|
|
660
|
+
en: "Welcome to Our Platform",
|
|
661
|
+
fr: "Bienvenue sur Notre Plateforme",
|
|
662
|
+
es: "Bienvenido a Nuestra Plataforma",
|
|
663
|
+
}),
|
|
664
|
+
subtitle: t({
|
|
665
|
+
en: "Build amazing applications with ease",
|
|
666
|
+
fr: "Construisez des applications incroyables avec facilité",
|
|
667
|
+
es: "Construye aplicaciones increíbles con facilidad",
|
|
668
|
+
}),
|
|
669
|
+
cta: cond({
|
|
670
|
+
true: t({
|
|
671
|
+
en: "Get Started",
|
|
672
|
+
fr: "Commencer",
|
|
673
|
+
es: "Comenzar",
|
|
674
|
+
}),
|
|
675
|
+
false: t({
|
|
676
|
+
en: "Sign Up",
|
|
677
|
+
fr: "S'inscrire",
|
|
678
|
+
es: "Registrarse",
|
|
679
|
+
}),
|
|
680
|
+
}),
|
|
681
|
+
},
|
|
682
|
+
features: [
|
|
683
|
+
{
|
|
684
|
+
title: t({
|
|
685
|
+
en: "Easy to Use",
|
|
686
|
+
fr: "Facile à Utiliser",
|
|
687
|
+
es: "Fácil de Usar",
|
|
688
|
+
}),
|
|
689
|
+
description: t({
|
|
690
|
+
en: "Intuitive interface for all skill levels",
|
|
691
|
+
fr: "Interface intuitive pour tous les niveaux",
|
|
692
|
+
es: "Interfaz intuitiva para todos los niveles",
|
|
693
|
+
}),
|
|
694
|
+
},
|
|
695
|
+
],
|
|
696
|
+
documentation: nest("documentation"),
|
|
697
|
+
readme: file("./README.md"),
|
|
698
|
+
},
|
|
699
|
+
} satisfies Dictionary;
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
### File Konten JSON
|
|
703
|
+
|
|
704
|
+
Anda juga dapat membuat file konten dalam format JSON:
|
|
705
|
+
|
|
706
|
+
```json
|
|
707
|
+
{
|
|
708
|
+
"key": "welcome-page",
|
|
709
|
+
"title": "Konten Halaman Selamat Datang",
|
|
710
|
+
"description": "Konten untuk halaman utama selamat datang",
|
|
711
|
+
"tags": ["page", "welcome"],
|
|
712
|
+
"content": {
|
|
713
|
+
"hero": {
|
|
714
|
+
"title": {
|
|
715
|
+
"nodeType": "translation",
|
|
716
|
+
"translation": {
|
|
717
|
+
"en": "Welcome to Our Platform",
|
|
718
|
+
"fr": "Bienvenue sur Notre Plateforme"
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"subtitle": {
|
|
722
|
+
"nodeType": "translation",
|
|
723
|
+
"translation": {
|
|
724
|
+
"en": "Build amazing applications with ease",
|
|
725
|
+
"fr": "Construisez des applications incroyables avec facilité"
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
Anda juga dapat membuat file konten dalam format JSON:
|
|
734
|
+
|
|
735
|
+
```json
|
|
736
|
+
{
|
|
737
|
+
"key": "welcome-page",
|
|
738
|
+
"title": "Konten Halaman Selamat Datang",
|
|
739
|
+
"description": "Konten untuk halaman selamat datang utama",
|
|
740
|
+
"tags": ["halaman", "selamat datang"],
|
|
741
|
+
"content": {
|
|
742
|
+
"hero": {
|
|
743
|
+
"title": {
|
|
744
|
+
"nodeType": "translation",
|
|
745
|
+
"translation": {
|
|
746
|
+
"en": "Welcome to Our Platform",
|
|
747
|
+
"fr": "Bienvenue sur Notre Plateforme"
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"subtitle": {
|
|
751
|
+
"nodeType": "translation",
|
|
752
|
+
"translation": {
|
|
753
|
+
"en": "Build amazing applications with ease",
|
|
754
|
+
"fr": "Construisez des applications incroyables avec facilité"
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
### File Konten Per-Locale
|
|
763
|
+
|
|
764
|
+
Untuk kamus per-locale, tentukan properti `locale`:
|
|
765
|
+
|
|
766
|
+
```typescript
|
|
767
|
+
typescript;
|
|
768
|
+
// welcome-page.en.content.ts
|
|
769
|
+
export default {
|
|
770
|
+
key: "welcome-page",
|
|
771
|
+
locale: "en",
|
|
772
|
+
content: {
|
|
773
|
+
hero: {
|
|
774
|
+
title: "Welcome to Our Platform",
|
|
775
|
+
subtitle: "Build amazing applications with ease",
|
|
776
|
+
},
|
|
777
|
+
},
|
|
778
|
+
} satisfies Dictionary;
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
```typescript
|
|
782
|
+
// welcome-page.fr.content.ts
|
|
783
|
+
export default {
|
|
784
|
+
key: "welcome-page",
|
|
785
|
+
locale: "fr",
|
|
786
|
+
content: {
|
|
787
|
+
hero: {
|
|
788
|
+
title: "Bienvenue sur Notre Plateforme",
|
|
789
|
+
subtitle: "Construisez des applications incroyables avec facilité",
|
|
790
|
+
},
|
|
791
|
+
},
|
|
792
|
+
} satisfies Dictionary;
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
## Ekstensi File Konten
|
|
796
|
+
|
|
797
|
+
Intlayer memungkinkan Anda untuk menyesuaikan ekstensi untuk file deklarasi konten Anda. Kustomisasi ini memberikan fleksibilitas dalam mengelola proyek berskala besar dan membantu menghindari konflik dengan modul lain.
|
|
798
|
+
|
|
799
|
+
### Ekstensi Default
|
|
800
|
+
|
|
801
|
+
Secara default, Intlayer memantau semua file dengan ekstensi berikut untuk deklarasi konten:
|
|
802
|
+
|
|
803
|
+
- `.content.json`
|
|
804
|
+
- `.content.ts`
|
|
805
|
+
- `.content.tsx`
|
|
806
|
+
- `.content.js`
|
|
807
|
+
- `.content.jsx`
|
|
808
|
+
- `.content.mjs`
|
|
809
|
+
- `.content.mjx`
|
|
810
|
+
- `.content.cjs`
|
|
811
|
+
- `.content.cjx`
|
|
812
|
+
|
|
813
|
+
Ekstensi default ini cocok untuk sebagian besar aplikasi. Namun, ketika Anda memiliki kebutuhan khusus, Anda dapat menentukan ekstensi kustom untuk menyederhanakan proses build dan mengurangi risiko konflik dengan komponen lain.
|
|
814
|
+
|
|
815
|
+
> Untuk menyesuaikan ekstensi file yang digunakan Intlayer untuk mengidentifikasi file deklarasi konten, Anda dapat menentukan ekstensi tersebut dalam file konfigurasi Intlayer. Pendekatan ini bermanfaat untuk proyek skala besar di mana membatasi cakupan proses pemantauan meningkatkan performa build.
|
|
816
|
+
|
|
817
|
+
## Konsep Lanjutan
|
|
818
|
+
|
|
819
|
+
### Penggabungan Kamus
|
|
820
|
+
|
|
821
|
+
Ketika beberapa kamus memiliki kunci yang sama, Intlayer secara otomatis menggabungkannya. Perilaku penggabungan tergantung pada beberapa faktor:
|
|
822
|
+
|
|
823
|
+
- **Prioritas**: Kamus dengan nilai `priority` lebih tinggi akan menimpa yang memiliki nilai lebih rendah
|
|
824
|
+
- **Auto-fill vs Base**: Kamus dasar (base) menimpa kamus yang diisi otomatis (auto-filled)
|
|
825
|
+
- **Lokasi**: Kamus lokal menimpa kamus jarak jauh (remote) (ketika prioritas sama)
|
|
826
|
+
|
|
827
|
+
### Keamanan Tipe (Type Safety)
|
|
828
|
+
|
|
829
|
+
Intlayer menyediakan dukungan penuh TypeScript untuk file konten:
|
|
830
|
+
|
|
831
|
+
```typescript
|
|
832
|
+
// Definisikan tipe konten Anda
|
|
833
|
+
interface WelcomePageContent {
|
|
834
|
+
hero: {
|
|
835
|
+
title: string;
|
|
836
|
+
subtitle: string;
|
|
837
|
+
cta: string;
|
|
838
|
+
};
|
|
839
|
+
features: Array<{
|
|
840
|
+
title: string;
|
|
841
|
+
description: string;
|
|
842
|
+
}>;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
// Gunakan di kamus Anda
|
|
846
|
+
export default {
|
|
847
|
+
key: "welcome-page",
|
|
848
|
+
content: {
|
|
849
|
+
// TypeScript akan menyediakan autocomplete dan pengecekan tipe
|
|
850
|
+
hero: {
|
|
851
|
+
title: "Selamat Datang",
|
|
852
|
+
subtitle: "Bangun aplikasi luar biasa",
|
|
853
|
+
cta: "Mulai",
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
} satisfies Dictionary<WelcomePageContent>;
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
### Imbrikasi Node
|
|
860
|
+
|
|
861
|
+
Anda dapat dengan mudah mengimbrikasikan fungsi ke dalam fungsi lain.
|
|
862
|
+
|
|
863
|
+
Contoh:
|
|
864
|
+
|
|
865
|
+
```javascript fileName="src/example.content.tsx" contentDeclarationFormat="typescript"
|
|
866
|
+
import { t, enu, cond, nest, md, type Dictionary } from "intlayer";
|
|
867
|
+
|
|
868
|
+
const getName = async () => "John Doe";
|
|
869
|
+
|
|
870
|
+
export default {
|
|
871
|
+
key: "page",
|
|
872
|
+
content: {
|
|
873
|
+
// `getIntlayer('page','en').hiMessage` mengembalikan `['Hi', ' ', 'John Doe']`
|
|
874
|
+
hiMessage: [
|
|
875
|
+
t({
|
|
876
|
+
en: "Hi",
|
|
877
|
+
fr: "Salut",
|
|
878
|
+
es: "Hola",
|
|
879
|
+
}),
|
|
880
|
+
" ",
|
|
881
|
+
getName(),
|
|
882
|
+
],
|
|
883
|
+
// Konten komposit yang menggabungkan kondisi, enumerasi, dan konten multibahasa
|
|
884
|
+
// `getIntlayer('page','en').advancedContent(true)(10) mengembalikan 'Multiple items found'`
|
|
885
|
+
advancedContent: cond({
|
|
886
|
+
true: enu({
|
|
887
|
+
"0": t({
|
|
888
|
+
en: "No items found",
|
|
889
|
+
fr: "Aucun article trouvé",
|
|
890
|
+
es: "No se encontraron artículos",
|
|
891
|
+
}),
|
|
892
|
+
"1": t({
|
|
893
|
+
en: "One item found",
|
|
894
|
+
fr: "Un article trouvé",
|
|
895
|
+
es: "Se encontró un artículo",
|
|
896
|
+
}),
|
|
897
|
+
">1": t({
|
|
898
|
+
en: "Multiple items found",
|
|
899
|
+
fr: "Plusieurs articles trouvés",
|
|
900
|
+
es: "Se encontraron múltiples artículos",
|
|
901
|
+
}),
|
|
902
|
+
}),
|
|
903
|
+
false: t({
|
|
904
|
+
en: "No valid data available",
|
|
905
|
+
fr: "Aucune donnée valide disponible",
|
|
906
|
+
es: "Tidak ada data valid yang tersedia",
|
|
907
|
+
}),
|
|
908
|
+
}),
|
|
909
|
+
},
|
|
910
|
+
} satisfies Dictionary;
|
|
911
|
+
```
|
|
912
|
+
|
|
913
|
+
```javascript fileName="src/example.content.mjx" contentDeclarationFormat="esm"
|
|
914
|
+
import { t, enu, cond, nest, md } from "intlayer";
|
|
915
|
+
|
|
916
|
+
const getName = async () => "John Doe";
|
|
917
|
+
|
|
918
|
+
/** @type {import('intlayer').Dictionary} */
|
|
919
|
+
export default {
|
|
920
|
+
key: "page",
|
|
921
|
+
content: {
|
|
922
|
+
// `getIntlayer('page','en').hiMessage` mengembalikan `['Hi', ' ', 'John Doe']`
|
|
923
|
+
hiMessage: [
|
|
924
|
+
t({
|
|
925
|
+
en: "Hi",
|
|
926
|
+
fr: "Salut",
|
|
927
|
+
es: "Hola",
|
|
928
|
+
}),
|
|
929
|
+
" ",
|
|
930
|
+
getName(),
|
|
931
|
+
],
|
|
932
|
+
// Konten komposit yang menggabungkan kondisi, enumerasi, dan konten multibahasa
|
|
933
|
+
// `getIntlayer('page','en').advancedContent(true)(10)` mengembalikan 'Multiple items found'
|
|
934
|
+
advancedContent: cond({
|
|
935
|
+
true: enu({
|
|
936
|
+
"0": t({
|
|
937
|
+
en: "No items found",
|
|
938
|
+
fr: "Aucun article trouvé",
|
|
939
|
+
es: "Tidak ada item yang ditemukan",
|
|
940
|
+
}),
|
|
941
|
+
"1": t({
|
|
942
|
+
en: "One item found",
|
|
943
|
+
fr: "Un article trouvé",
|
|
944
|
+
es: "Satu item ditemukan",
|
|
945
|
+
}),
|
|
946
|
+
">1": t({
|
|
947
|
+
en: "Multiple items found",
|
|
948
|
+
fr: "Plusieurs articles trouvés",
|
|
949
|
+
es: "Beberapa item ditemukan",
|
|
950
|
+
}),
|
|
951
|
+
}),
|
|
952
|
+
false: t({
|
|
953
|
+
en: "No valid data available",
|
|
954
|
+
fr: "Aucune donnée valide disponible",
|
|
955
|
+
es: "Tidak ada data valid yang tersedia",
|
|
956
|
+
}),
|
|
957
|
+
}),
|
|
958
|
+
},
|
|
959
|
+
};
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
```javascript fileName="src/example.content.cjx" contentDeclarationFormat="commonjs"
|
|
963
|
+
const { t, enu, cond, nest, md } = require("intlayer");
|
|
964
|
+
|
|
965
|
+
const getName = async () => "John Doe";
|
|
966
|
+
|
|
967
|
+
/** @type {import('intlayer').Dictionary} */
|
|
968
|
+
module.exports = {
|
|
969
|
+
key: "page",
|
|
970
|
+
content: {
|
|
971
|
+
// `getIntlayer('page','en').hiMessage` mengembalikan `['Hi', ' ', 'John Doe']`
|
|
972
|
+
hiMessage: [
|
|
973
|
+
t({
|
|
974
|
+
en: "Hi",
|
|
975
|
+
fr: "Salut",
|
|
976
|
+
es: "Hola",
|
|
977
|
+
}),
|
|
978
|
+
" ",
|
|
979
|
+
getName(),
|
|
980
|
+
],
|
|
981
|
+
// Konten komposit yang menggabungkan kondisi, enumerasi, dan konten multibahasa
|
|
982
|
+
// `getIntlayer('page','en').advancedContent(true)(10)` mengembalikan 'Multiple items found'
|
|
983
|
+
advancedContent: cond({
|
|
984
|
+
true: enu({
|
|
985
|
+
"0": t({
|
|
986
|
+
en: "No items found",
|
|
987
|
+
fr: "Aucun article trouvé",
|
|
988
|
+
es: "No se encontraron artículos",
|
|
989
|
+
}),
|
|
990
|
+
"1": t({
|
|
991
|
+
en: "One item found",
|
|
992
|
+
fr: "Un article trouvé",
|
|
993
|
+
es: "Se encontró un artículo",
|
|
994
|
+
}),
|
|
995
|
+
">1": t({
|
|
996
|
+
en: "Multiple items found",
|
|
997
|
+
fr: "Plusieurs articles trouvés",
|
|
998
|
+
es: "Beberapa item ditemukan",
|
|
999
|
+
}),
|
|
1000
|
+
}),
|
|
1001
|
+
false: t({
|
|
1002
|
+
en: "No valid data available",
|
|
1003
|
+
fr: "Aucune donnée valide disponible",
|
|
1004
|
+
es: "Tidak ada data valid yang tersedia",
|
|
1005
|
+
}),
|
|
1006
|
+
}),
|
|
1007
|
+
},
|
|
1008
|
+
};
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
```json5 fileName="src/example.content.json" contentDeclarationFormat="json"
|
|
1012
|
+
{
|
|
1013
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
1014
|
+
"key": "page",
|
|
1015
|
+
"content": {
|
|
1016
|
+
"hiMessage": {
|
|
1017
|
+
"nodeType": "composite",
|
|
1018
|
+
"composite": [
|
|
1019
|
+
{
|
|
1020
|
+
"nodeType": "translation",
|
|
1021
|
+
"translation": {
|
|
1022
|
+
"en": "Hi",
|
|
1023
|
+
"fr": "Salut",
|
|
1024
|
+
"es": "Hola",
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
" ",
|
|
1028
|
+
"John Doe",
|
|
1029
|
+
],
|
|
1030
|
+
},
|
|
1031
|
+
"advancedContent": {
|
|
1032
|
+
"nodeType": "condition",
|
|
1033
|
+
"condition": {
|
|
1034
|
+
"true": {
|
|
1035
|
+
"nodeType": "enumeration",
|
|
1036
|
+
"enumeration": {
|
|
1037
|
+
"0": {
|
|
1038
|
+
"nodeType": "translation",
|
|
1039
|
+
"translation": {
|
|
1040
|
+
en: "Tidak ada item yang ditemukan",
|
|
1041
|
+
fr: "Aucun article trouvé",
|
|
1042
|
+
es: "No se encontraron artículos",
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
"1": {
|
|
1046
|
+
"nodeType": "translation",
|
|
1047
|
+
"translation": {
|
|
1048
|
+
en: "Satu item ditemukan",
|
|
1049
|
+
fr: "Un article trouvé",
|
|
1050
|
+
es: "Se encontró un artículo",
|
|
1051
|
+
},
|
|
1052
|
+
},
|
|
1053
|
+
">1": {
|
|
1054
|
+
"nodeType": "translation",
|
|
1055
|
+
"translation": {
|
|
1056
|
+
"en": "Multiple items found",
|
|
1057
|
+
"fr": "Plusieurs articles trouvés",
|
|
1058
|
+
"es": "Se encontraron múltiples artículos",
|
|
1059
|
+
},
|
|
1060
|
+
},
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
"false": {
|
|
1064
|
+
"nodeType": "translation",
|
|
1065
|
+
"translation": {
|
|
1066
|
+
"en": "No valid data available",
|
|
1067
|
+
"fr": "Aucune donnée valide disponible",
|
|
1068
|
+
"es": "No hay datos válidos disponibles",
|
|
1069
|
+
},
|
|
1070
|
+
},
|
|
1071
|
+
},
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
1074
|
+
}
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
### Praktik Terbaik
|
|
1078
|
+
|
|
1079
|
+
1. **Konvensi Penamaan**:
|
|
1080
|
+
- Gunakan kebab-case untuk kunci kamus (`"about-page-meta"`)
|
|
1081
|
+
- Kelompokkan konten terkait di bawah prefix kunci yang sama
|
|
1082
|
+
|
|
1083
|
+
2. **Organisasi Konten**:
|
|
1084
|
+
- Simpan konten terkait bersama dalam kamus yang sama
|
|
1085
|
+
- Gunakan objek bersarang untuk mengatur struktur konten yang kompleks
|
|
1086
|
+
- Manfaatkan tag untuk kategorisasi
|
|
1087
|
+
- Gunakan `fill` untuk mengisi terjemahan yang hilang secara otomatis
|
|
1088
|
+
|
|
1089
|
+
3. **Performa**:
|
|
1090
|
+
- Sesuaikan konfigurasi konten untuk membatasi cakupan file yang dipantau
|
|
1091
|
+
- Gunakan kamus langsung hanya ketika pembaruan waktu nyata diperlukan, (misalnya A/B testing, dll.)
|
|
1092
|
+
- Pastikan plugin transformasi build (`@intlayer/swc`, atau `@intlayer/babel`) diaktifkan untuk mengoptimalkan kamus saat build time
|