@intlayer/docs 5.8.0-canary.0 → 5.8.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/intlayer_with_next-i18next.md +2 -2
- package/blog/ar/next-i18next_vs_next-intl_vs_intlayer.md +96 -219
- package/blog/ar/react-i18next_vs_react-intl_vs_intlayer.md +88 -129
- package/blog/ar/vue-i18n_vs_intlayer.md +268 -0
- package/blog/de/intlayer_with_next-i18next.md +2 -2
- package/blog/de/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/de/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/de/vue-i18n_vs_intlayer.md +268 -0
- package/blog/en/intlayer_with_next-i18next.md +2 -2
- package/blog/en/next-i18next_vs_next-intl_vs_intlayer.md +89 -220
- package/blog/en/react-i18next_vs_react-intl_vs_intlayer.md +85 -123
- package/blog/en/vue-i18n_vs_intlayer.md +268 -0
- package/blog/en-GB/intlayer_with_next-i18next.md +2 -2
- package/blog/en-GB/next-i18next_vs_next-intl_vs_intlayer.md +85 -218
- package/blog/en-GB/react-i18next_vs_react-intl_vs_intlayer.md +80 -130
- package/blog/en-GB/vue-i18n_vs_intlayer.md +258 -0
- package/blog/es/intlayer_with_next-i18next.md +2 -2
- package/blog/es/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/es/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/es/vue-i18n_vs_intlayer.md +268 -0
- package/blog/fr/intlayer_with_next-i18next.md +2 -2
- package/blog/fr/next-i18next_vs_next-intl_vs_intlayer.md +91 -214
- package/blog/fr/react-i18next_vs_react-intl_vs_intlayer.md +86 -127
- package/blog/fr/vue-i18n_vs_intlayer.md +269 -0
- package/blog/hi/intlayer_with_next-i18next.md +2 -2
- package/blog/hi/next-i18next_vs_next-intl_vs_intlayer.md +97 -220
- package/blog/hi/react-i18next_vs_react-intl_vs_intlayer.md +89 -130
- package/blog/hi/vue-i18n_vs_intlayer.md +268 -0
- package/blog/it/intlayer_with_next-i18next.md +2 -2
- package/blog/it/next-i18next_vs_next-intl_vs_intlayer.md +91 -214
- package/blog/it/react-i18next_vs_react-intl_vs_intlayer.md +86 -127
- package/blog/it/vue-i18n_vs_intlayer.md +268 -0
- package/blog/ja/intlayer_with_next-i18next.md +2 -2
- package/blog/ja/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/ja/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/ja/vue-i18n_vs_intlayer.md +268 -0
- package/blog/ko/intlayer_with_next-i18next.md +2 -2
- package/blog/ko/next-i18next_vs_next-intl_vs_intlayer.md +95 -217
- package/blog/ko/react-i18next_vs_react-intl_vs_intlayer.md +89 -130
- package/blog/ko/vue-i18n_vs_intlayer.md +268 -0
- package/blog/pt/intlayer_with_next-i18next.md +2 -2
- package/blog/pt/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/pt/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/pt/vue-i18n_vs_intlayer.md +268 -0
- package/blog/ru/intlayer_with_next-i18next.md +2 -2
- package/blog/ru/next-i18next_vs_next-intl_vs_intlayer.md +94 -217
- package/blog/ru/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/ru/vue-i18n_vs_intlayer.md +268 -0
- package/blog/zh/intlayer_with_next-i18next.md +2 -2
- package/blog/zh/next-i18next_vs_next-intl_vs_intlayer.md +93 -216
- package/blog/zh/react-i18next_vs_react-intl_vs_intlayer.md +87 -128
- package/blog/zh/vue-i18n_vs_intlayer.md +269 -0
- package/dist/cjs/generated/blog.entry.cjs +41 -0
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +41 -0
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -0
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/docs/ar/formatters.md +417 -31
- package/docs/ar/how_works_intlayer.md +2 -4
- package/docs/ar/interest_of_intlayer.md +7 -10
- package/docs/ar/intlayer_CMS.md +2 -3
- package/docs/ar/intlayer_visual_editor.md +2 -3
- package/docs/ar/intlayer_with_tanstack.md +1 -1
- package/docs/ar/introduction.md +4 -4
- package/docs/de/formatters.md +444 -34
- package/docs/de/introduction.md +2 -2
- package/docs/en/dictionary/enumeration.md +2 -2
- package/docs/en/dictionary/function_fetching.md +2 -2
- package/docs/en/dictionary/get_started.md +2 -2
- package/docs/en/dictionary/translation.md +2 -2
- package/docs/en/formatters.md +383 -15
- package/docs/en/how_works_intlayer.md +2 -4
- package/docs/en/interest_of_intlayer.md +40 -29
- package/docs/en/intlayer_CMS.md +2 -3
- package/docs/en/intlayer_visual_editor.md +2 -3
- package/docs/en/intlayer_with_create_react_app.md +2 -2
- package/docs/en/intlayer_with_express.md +2 -2
- package/docs/en/intlayer_with_tanstack.md +1 -1
- package/docs/en/introduction.md +4 -4
- package/docs/en/packages/express-intlayer/index.md +2 -2
- package/docs/en/packages/intlayer/getConfiguration.md +2 -3
- package/docs/en/packages/intlayer/getEnumeration.md +2 -7
- package/docs/en/packages/intlayer/getHTMLTextDir.md +2 -4
- package/docs/en/packages/intlayer/getLocaleLang.md +2 -4
- package/docs/en/packages/intlayer/getLocaleName.md +2 -3
- package/docs/en/packages/intlayer/getLocalizedUrl.md +2 -8
- package/docs/en/packages/intlayer/getMultilingualUrls.md +2 -7
- package/docs/en/packages/intlayer/getPathWithoutLocale.md +2 -3
- package/docs/en/packages/intlayer/getTranslation.md +2 -4
- package/docs/en/packages/intlayer/index.md +2 -2
- package/docs/en/packages/next-intlayer/index.md +2 -2
- package/docs/en/packages/next-intlayer/t.md +2 -2
- package/docs/en/packages/next-intlayer/useDictionary.md +2 -2
- package/docs/en/packages/next-intlayer/useIntlayer.md +2 -2
- package/docs/en/packages/next-intlayer/useLocale.md +2 -2
- package/docs/en/packages/react-intlayer/index.md +2 -2
- package/docs/en/packages/react-intlayer/t.md +2 -2
- package/docs/en/packages/react-intlayer/useI18n.md +2 -2
- package/docs/en/packages/react-intlayer/useIntlayer.md +2 -2
- package/docs/en/packages/react-intlayer/useLocale.md +2 -2
- package/docs/en/packages/react-scripts-intlayer/index.md +2 -2
- package/docs/en/packages/solid-intlayer/index.md +2 -2
- package/docs/en/packages/vite-intlayer/index.md +2 -2
- package/docs/en-GB/formatters.md +402 -16
- package/docs/en-GB/how_works_intlayer.md +2 -4
- package/docs/en-GB/interest_of_intlayer.md +7 -10
- package/docs/en-GB/intlayer_with_tanstack.md +1 -1
- package/docs/en-GB/introduction.md +2 -2
- package/docs/es/formatters.md +438 -28
- package/docs/es/how_works_intlayer.md +2 -4
- package/docs/es/interest_of_intlayer.md +7 -10
- package/docs/es/intlayer_with_tanstack.md +1 -1
- package/docs/es/introduction.md +2 -2
- package/docs/fr/formatters.md +438 -28
- package/docs/fr/how_works_intlayer.md +2 -4
- package/docs/fr/interest_of_intlayer.md +7 -10
- package/docs/fr/intlayer_with_tanstack.md +1 -1
- package/docs/fr/introduction.md +2 -2
- package/docs/hi/formatters.md +430 -39
- package/docs/hi/how_works_intlayer.md +2 -4
- package/docs/hi/interest_of_intlayer.md +7 -10
- package/docs/hi/intlayer_with_tanstack.md +1 -1
- package/docs/hi/introduction.md +2 -2
- package/docs/it/formatters.md +438 -30
- package/docs/it/how_works_intlayer.md +2 -4
- package/docs/it/interest_of_intlayer.md +7 -10
- package/docs/it/intlayer_with_tanstack.md +1 -1
- package/docs/it/introduction.md +2 -2
- package/docs/ja/formatters.md +435 -47
- package/docs/ja/how_works_intlayer.md +2 -4
- package/docs/ja/interest_of_intlayer.md +7 -10
- package/docs/ja/intlayer_with_tanstack.md +1 -1
- package/docs/ja/introduction.md +2 -2
- package/docs/ko/formatters.md +432 -41
- package/docs/ko/how_works_intlayer.md +2 -4
- package/docs/ko/interest_of_intlayer.md +7 -10
- package/docs/ko/intlayer_with_tanstack.md +1 -1
- package/docs/ko/introduction.md +2 -2
- package/docs/pt/formatters.md +416 -30
- package/docs/pt/how_works_intlayer.md +2 -4
- package/docs/pt/intlayer_with_tanstack.md +1 -1
- package/docs/pt/introduction.md +2 -2
- package/docs/ru/autoFill.md +2 -2
- package/docs/ru/configuration.md +1 -40
- package/docs/ru/formatters.md +438 -28
- package/docs/ru/how_works_intlayer.md +5 -7
- package/docs/ru/index.md +1 -1
- package/docs/ru/interest_of_intlayer.md +8 -11
- package/docs/ru/intlayer_CMS.md +7 -8
- package/docs/ru/intlayer_cli.md +4 -7
- package/docs/ru/intlayer_visual_editor.md +5 -6
- package/docs/ru/intlayer_with_angular.md +1 -1
- package/docs/ru/intlayer_with_create_react_app.md +5 -5
- package/docs/ru/intlayer_with_lynx+react.md +1 -1
- package/docs/ru/intlayer_with_nextjs_15.md +3 -3
- package/docs/ru/intlayer_with_nextjs_page_router.md +2 -2
- package/docs/ru/intlayer_with_nuxt.md +1 -1
- package/docs/ru/intlayer_with_react_native+expo.md +2 -2
- package/docs/ru/intlayer_with_tanstack.md +3 -3
- package/docs/ru/intlayer_with_vite+preact.md +3 -3
- package/docs/ru/intlayer_with_vite+react.md +3 -3
- package/docs/ru/intlayer_with_vite+solid.md +1 -1
- package/docs/ru/intlayer_with_vite+svelte.md +1 -1
- package/docs/ru/intlayer_with_vite+vue.md +2 -2
- package/docs/ru/introduction.md +5 -5
- package/docs/ru/locale_mapper.md +1 -1
- package/docs/ru/packages/@intlayer/api/index.md +2 -2
- package/docs/ru/packages/@intlayer/chokidar/index.md +1 -1
- package/docs/ru/packages/@intlayer/cli/index.md +2 -2
- package/docs/ru/packages/@intlayer/config/index.md +2 -2
- package/docs/ru/packages/@intlayer/core/index.md +2 -2
- package/docs/ru/packages/@intlayer/design-system/index.md +2 -2
- package/docs/ru/packages/@intlayer/dictionary-entry/index.md +2 -2
- package/docs/ru/packages/@intlayer/editor/index.md +1 -1
- package/docs/ru/packages/@intlayer/editor-react/index.md +1 -1
- package/docs/ru/packages/@intlayer/webpack/index.md +1 -1
- package/docs/ru/packages/angular-intlayer/index.md +1 -1
- package/docs/ru/packages/express-intlayer/index.md +3 -3
- package/docs/ru/packages/express-intlayer/t.md +1 -1
- package/docs/ru/packages/intlayer/getEnumeration.md +3 -8
- package/docs/ru/packages/intlayer/getTranslation.md +3 -5
- package/docs/ru/packages/intlayer/getTranslationContent.md +1 -3
- package/docs/ru/packages/intlayer/index.md +3 -3
- package/docs/ru/packages/intlayer-cli/index.md +1 -1
- package/docs/ru/packages/intlayer-editor/index.md +2 -2
- package/docs/ru/packages/lynx-intlayer/index.md +1 -1
- package/docs/ru/packages/next-intlayer/index.md +4 -4
- package/docs/ru/packages/next-intlayer/t.md +4 -4
- package/docs/ru/packages/next-intlayer/useLocale.md +3 -3
- package/docs/ru/packages/nuxt-intlayer/index.md +1 -1
- package/docs/ru/packages/preact-intlayer/index.md +1 -1
- package/docs/ru/packages/react-intlayer/index.md +4 -4
- package/docs/ru/packages/react-intlayer/t.md +4 -4
- package/docs/ru/packages/react-native-intlayer/index.md +1 -1
- package/docs/ru/packages/react-scripts-intlayer/index.md +3 -3
- package/docs/ru/packages/solid-intlayer/index.md +3 -3
- package/docs/ru/packages/svelte-intlayer/index.md +1 -1
- package/docs/ru/packages/vite-intlayer/index.md +3 -3
- package/docs/ru/packages/vue-intlayer/index.md +1 -1
- package/docs/ru/per_locale_file.md +1 -1
- package/docs/ru/roadmap.md +3 -5
- package/docs/ru/vs_code_extension.md +1 -1
- package/docs/zh/formatters.md +446 -38
- package/docs/zh/how_works_intlayer.md +2 -4
- package/docs/zh/interest_of_intlayer.md +7 -10
- package/docs/zh/intlayer_with_tanstack.md +1 -1
- package/docs/zh/introduction.md +2 -2
- package/frequent_questions/ar/domain_routing.md +1 -1
- package/frequent_questions/en/domain_routing.md +1 -1
- package/frequent_questions/en-GB/domain_routing.md +1 -1
- package/frequent_questions/es/domain_routing.md +1 -1
- package/frequent_questions/fr/domain_routing.md +1 -1
- package/frequent_questions/hi/domain_routing.md +1 -1
- package/frequent_questions/it/domain_routing.md +1 -1
- package/frequent_questions/ko/domain_routing.md +1 -1
- package/frequent_questions/pt/domain_routing.md +1 -1
- package/frequent_questions/ru/domain_routing.md +1 -1
- package/frequent_questions/ru/get_locale_cookie.md +4 -4
- package/frequent_questions/ru/static_rendering.md +1 -2
- package/frequent_questions/zh/domain_routing.md +1 -1
- package/package.json +7 -7
- package/src/generated/blog.entry.ts +41 -0
package/docs/en/intlayer_CMS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: Intlayer CMS | Externalize your content into the Intlayer CMS
|
|
5
5
|
description: Externalize your content into the Intlayer CMS to delegate the management of your content to your team.
|
|
6
6
|
keywords:
|
|
@@ -345,7 +345,6 @@ If you encounter any issues with the CMS, check the following:
|
|
|
345
345
|
- The application is running.
|
|
346
346
|
|
|
347
347
|
- The [`editor`](https://intlayer.org/doc/concept/configuration#editor-configuration) configuration are correctly set in your Intlayer configuration file.
|
|
348
|
-
|
|
349
348
|
- Required fields:
|
|
350
349
|
- The application URL should match the one you set in the editor configuration (`applicationURL`).
|
|
351
350
|
- The CMS URL
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: Intlayer Visual Editor | Edit your content using a visual editor
|
|
5
5
|
description: Discover how to use the Intlayer Editor to manage your multilingual website. Follow the steps in this online documentation to set up your project in a few minutes.
|
|
6
6
|
keywords:
|
|
@@ -257,7 +257,6 @@ If you encounter any issues with the visual editor, check the following:
|
|
|
257
257
|
- The visual editor and the application are running.
|
|
258
258
|
|
|
259
259
|
- The [`editor`](https://intlayer.org/doc/concept/configuration#editor-configuration) configuration are correctly set in your Intlayer configuration file.
|
|
260
|
-
|
|
261
260
|
- Required fields:
|
|
262
261
|
- The application URL should match the one you set in the editor configuration (`applicationURL`).
|
|
263
262
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: Translate your Create React App (CRA) website (i18n)
|
|
5
5
|
description: Discover how to make your Create React App (CRA) website multilingual. Follow the documentation to internationalize (i18n) and translate it.
|
|
6
6
|
keywords:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: Translate your Express backend (i18n)
|
|
5
5
|
description: Discover how to make your vite backend multilingual. Follow the documentation to internationalize (i18n) and translate it.
|
|
6
6
|
keywords:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
createdAt: 2025-08-11
|
|
3
3
|
updatedAt: 2025-08-11
|
|
4
4
|
title: Getting Started with Intlayer in TanStack Start (React)
|
|
5
|
-
description: Add i18n to your TanStack Start app using Intlayer
|
|
5
|
+
description: Add i18n to your TanStack Start app using Intlayer-component-level dictionaries, localized URLs, and SEO-friendly metadata.
|
|
6
6
|
keywords:
|
|
7
7
|
- Internationalization
|
|
8
8
|
- Documentation
|
package/docs/en/introduction.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: Introduction
|
|
5
5
|
description: Discover how Intlayer works. See the steps used by Intlayer in your application. See what does the different packages do.
|
|
6
6
|
keywords:
|
|
@@ -32,8 +32,8 @@ Intlayer also provides an optional visual editor that allows you to easily edit
|
|
|
32
32
|
.
|
|
33
33
|
└── Components
|
|
34
34
|
└── MyComponent
|
|
35
|
-
├── index.content.
|
|
36
|
-
└── index.
|
|
35
|
+
├── index.content.ts
|
|
36
|
+
└── index.tsx
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
```tsx fileName="src/components/MyComponent/index.content.ts" contentDeclarationFormat="typescript"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getConfiguration Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getConfiguration function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -36,7 +36,6 @@ The function does not take any parameters. Instead, it uses environment variable
|
|
|
36
36
|
|
|
37
37
|
- **Type**: `IntlayerConfig`
|
|
38
38
|
- **Description**: An object containing the complete configuration for `intlayer`. The configuration includes the following sections:
|
|
39
|
-
|
|
40
39
|
- `internationalization`: Settings related to locales and strict mode.
|
|
41
40
|
- `middleware`: Settings related to URL and cookie management.
|
|
42
41
|
- `content`: Settings related to content files, directories, and patterns.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getEnumeration Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getEnumeration function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -29,13 +29,11 @@ The `getEnumeration` function retrieves content corresponding to a specific quan
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
31
|
- `enumerationContent: QuantityContent<Content>`
|
|
32
|
-
|
|
33
32
|
- **Description**: An object where keys represent conditions (e.g., `<=`, `<`, `>=`, `=`) and values represent the corresponding content. The order of keys defines their matching priority.
|
|
34
33
|
- **Type**: `QuantityContent<Content>`
|
|
35
34
|
- `Content` can be any type.
|
|
36
35
|
|
|
37
36
|
- `quantity: number`
|
|
38
|
-
|
|
39
37
|
- **Description**: The numeric value used to match against the conditions in `enumerationContent`.
|
|
40
38
|
- **Type**: `number`
|
|
41
39
|
|
|
@@ -141,15 +139,12 @@ console.log(content); // Output: "You have less than four"
|
|
|
141
139
|
## Edge Cases
|
|
142
140
|
|
|
143
141
|
- **No Matching Condition:**
|
|
144
|
-
|
|
145
142
|
- If no condition matches the provided quantity, the function will either return `undefined` or handle the default/fallback scenario explicitly.
|
|
146
143
|
|
|
147
144
|
- **Ambiguous Conditions:**
|
|
148
|
-
|
|
149
145
|
- If conditions overlap, the first matching condition (based on object order) takes precedence.
|
|
150
146
|
|
|
151
147
|
- **Invalid Keys:**
|
|
152
|
-
|
|
153
148
|
- The function assumes that all keys in `enumerationContent` are valid and parsable as conditions. Invalid or improperly formatted keys may lead to unexpected behavior.
|
|
154
149
|
|
|
155
150
|
- **TypeScript Enforcement:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getHTMLTextDir Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getHTMLTextDir function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -29,7 +29,6 @@ The `getHTMLTextDir` function determines the text direction (`ltr`, `rtl`, or `a
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
31
|
- `locale?: Locales`
|
|
32
|
-
|
|
33
32
|
- **Description**: The locale string (e.g., `Locales.ENGLISH`, `Locales.ARABIC`) used to determine the text direction.
|
|
34
33
|
- **Type**: `Locales` (optional)
|
|
35
34
|
|
|
@@ -72,7 +71,6 @@ getHTMLTextDir(Locales.ARABIC); // Output: "rtl"
|
|
|
72
71
|
## Edge Cases
|
|
73
72
|
|
|
74
73
|
- **No Locale Provided:**
|
|
75
|
-
|
|
76
74
|
- The function returns `'auto'` when `locale` is `undefined`.
|
|
77
75
|
|
|
78
76
|
- **Unrecognized Locale:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getLocaleLang Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getLocaleLang function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -29,7 +29,6 @@ The `getLocaleLang` function extracts the language code from a locale string. It
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
31
|
- `locale?: Locales`
|
|
32
|
-
|
|
33
32
|
- **Description**: The locale string (e.g., `Locales.ENGLISH_UNITED_STATES`, `Locales.FRENCH_CANADA`) from which the language code is extracted.
|
|
34
33
|
- **Type**: `Locales` (optional)
|
|
35
34
|
|
|
@@ -72,7 +71,6 @@ getLocaleLang(Locales.FRENCH); // Output: "fr"
|
|
|
72
71
|
## Edge Cases
|
|
73
72
|
|
|
74
73
|
- **No Locale Provided:**
|
|
75
|
-
|
|
76
74
|
- The function returns an empty string when `locale` is `undefined`.
|
|
77
75
|
|
|
78
76
|
- **Malformed Locale Strings:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getLocaleName Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getLocaleName function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -29,7 +29,6 @@ The `getLocaleName` function returns the localized name of a given locale (`targ
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
31
|
- `displayLocale: Locales`
|
|
32
|
-
|
|
33
32
|
- **Description**: The locale in which the name of the target locale will be displayed.
|
|
34
33
|
- **Type**: Enum or string representing valid locales.
|
|
35
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getLocalizedUrl Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getLocalizedUrl function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -31,23 +31,19 @@ The `getLocalizedUrl` function generates a localized URL by prefixing the given
|
|
|
31
31
|
## Parameters
|
|
32
32
|
|
|
33
33
|
- `url: string`
|
|
34
|
-
|
|
35
34
|
- **Description**: The original URL string to be prefixed with a locale.
|
|
36
35
|
- **Type**: `string`
|
|
37
36
|
|
|
38
37
|
- `currentLocale: Locales`
|
|
39
|
-
|
|
40
38
|
- **Description**: The current locale for which the URL is being localized.
|
|
41
39
|
- **Type**: `Locales`
|
|
42
40
|
|
|
43
41
|
- `locales: Locales[]`
|
|
44
|
-
|
|
45
42
|
- **Description**: Optional array of supported locales. By defaults, the configured locales in the project are provided.
|
|
46
43
|
- **Type**: `Locales[]`
|
|
47
44
|
- **Default**: [`Project Configuration`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md#middleware)
|
|
48
45
|
|
|
49
46
|
- `defaultLocale: Locales`
|
|
50
|
-
|
|
51
47
|
- **Description**: The default locale for the application. By defaults, the configured default locale in the project are provided.
|
|
52
48
|
- **Type**: `Locales`
|
|
53
49
|
- **Default**: [`Project Configuration`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md#middleware)
|
|
@@ -172,11 +168,9 @@ getLocalizedUrl(
|
|
|
172
168
|
## Edge Cases
|
|
173
169
|
|
|
174
170
|
- **No Locale Segment:**
|
|
175
|
-
|
|
176
171
|
- If the URL does not contain any locale segment, the function safely prefixes the appropriate locale.
|
|
177
172
|
|
|
178
173
|
- **Default Locale:**
|
|
179
|
-
|
|
180
174
|
- When `prefixDefault` is `false`, the function does not prefix the URL for the default locale.
|
|
181
175
|
|
|
182
176
|
- **Unsupported Locales:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getMultilingualUrls Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getMultilingualUrls function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -31,18 +31,15 @@ The `getMultilingualUrls` function generates a mapping of multilingual URLs by p
|
|
|
31
31
|
## Parameters
|
|
32
32
|
|
|
33
33
|
- `url: string`
|
|
34
|
-
|
|
35
34
|
- **Description**: The original URL string to be prefixed with locales.
|
|
36
35
|
- **Type**: `string`
|
|
37
36
|
|
|
38
37
|
- `locales: Locales[]`
|
|
39
|
-
|
|
40
38
|
- **Description**: Optional array of supported locales. Defaults to the configured locales in the project.
|
|
41
39
|
- **Type**: `Locales[]`
|
|
42
40
|
- **Default**: `localesDefault`
|
|
43
41
|
|
|
44
42
|
- `defaultLocale: Locales`
|
|
45
|
-
|
|
46
43
|
- **Description**: The default locale for the application. Defaults to the configured default locale in the project.
|
|
47
44
|
- **Type**: `Locales`
|
|
48
45
|
- **Default**: `defaultLocaleDefault`
|
|
@@ -128,11 +125,9 @@ getMultilingualUrls(
|
|
|
128
125
|
## Edge Cases
|
|
129
126
|
|
|
130
127
|
- **No Locale Segment:**
|
|
131
|
-
|
|
132
128
|
- The function removes any existing locale segment from the URL before generating the multilingual mappings.
|
|
133
129
|
|
|
134
130
|
- **Default Locale:**
|
|
135
|
-
|
|
136
131
|
- When `prefixDefault` is `false`, the function does not prefix the URL for the default locale.
|
|
137
132
|
|
|
138
133
|
- **Unsupported Locales:**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getPathWithoutLocale Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getPathWithoutLocale function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -29,7 +29,6 @@ Removes the locale segment from the given URL or pathname if present. It works w
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
31
|
- `inputUrl: string`
|
|
32
|
-
|
|
33
32
|
- **Description**: The complete URL string or pathname to process.
|
|
34
33
|
- **Type**: `string`
|
|
35
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
4
|
title: getTranslation Function Documentation | intlayer
|
|
5
5
|
description: See how to use the getTranslation function for intlayer package
|
|
6
6
|
keywords:
|
|
@@ -29,13 +29,11 @@ The `getTranslationContent` function retrieves the content corresponding to a sp
|
|
|
29
29
|
## Parameters
|
|
30
30
|
|
|
31
31
|
- `languageContent: CustomizableLanguageContent<Content>`
|
|
32
|
-
|
|
33
32
|
- **Description**: An object containing translations for various locales. Each key represents a locale, and its value is the corresponding content.
|
|
34
33
|
- **Type**: `CustomizableLanguageContent<Content>`
|
|
35
34
|
- `Content` can be any type, defaulting to `string`.
|
|
36
35
|
|
|
37
36
|
- `locale: Locales`
|
|
38
|
-
|
|
39
37
|
- **Description**: The locale for which content is to be retrieved.
|
|
40
38
|
- **Type**: `Locales`
|
|
41
39
|
|