@i18n-micro/types 2.0.0 → 2.0.1
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/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -214,6 +214,15 @@ export interface ModuleOptions {
|
|
|
214
214
|
* @default true
|
|
215
215
|
*/
|
|
216
216
|
redirects?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Redirect a locale prefix in another case or encoding to the page in its own spelling
|
|
219
|
+
* (`/DE/about` → `/de/about`, `/EN/about` → `/about` under `prefix_except_default`). The router
|
|
220
|
+
* matches the prefix case-insensitively, so without the redirect such a URL would show the page
|
|
221
|
+
* under a second address. When `false`, or when `redirects` is `false`, the URL is a 404. A URL
|
|
222
|
+
* with no page behind it in its own spelling is a 404 either way.
|
|
223
|
+
* @default true
|
|
224
|
+
*/
|
|
225
|
+
prefixCaseRedirect?: boolean;
|
|
217
226
|
/**
|
|
218
227
|
* Register the core i18n plugin that provides `$t()`, `$tc()`, `$getLocale()`,
|
|
219
228
|
* `$switchLocale()`, and other runtime helpers.
|
|
@@ -631,6 +640,8 @@ export interface ModuleOptionsExtend extends ModuleOptions {
|
|
|
631
640
|
disablePageLocales: boolean;
|
|
632
641
|
/** Resolved flag: whether locale-based redirects are enabled. */
|
|
633
642
|
redirects?: boolean;
|
|
643
|
+
/** Resolved flag: whether a locale prefix in another case or encoding redirects to its own spelling. */
|
|
644
|
+
prefixCaseRedirect?: boolean;
|
|
634
645
|
/** Resolved translation payload loading strategy. */
|
|
635
646
|
translationPayloadMode?: 'premerged' | 'source';
|
|
636
647
|
/** Premerged files are in `public/`, so they can sit on `app.cdnURL`. */
|
package/dist/index.d.ts
CHANGED
|
@@ -214,6 +214,15 @@ export interface ModuleOptions {
|
|
|
214
214
|
* @default true
|
|
215
215
|
*/
|
|
216
216
|
redirects?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Redirect a locale prefix in another case or encoding to the page in its own spelling
|
|
219
|
+
* (`/DE/about` → `/de/about`, `/EN/about` → `/about` under `prefix_except_default`). The router
|
|
220
|
+
* matches the prefix case-insensitively, so without the redirect such a URL would show the page
|
|
221
|
+
* under a second address. When `false`, or when `redirects` is `false`, the URL is a 404. A URL
|
|
222
|
+
* with no page behind it in its own spelling is a 404 either way.
|
|
223
|
+
* @default true
|
|
224
|
+
*/
|
|
225
|
+
prefixCaseRedirect?: boolean;
|
|
217
226
|
/**
|
|
218
227
|
* Register the core i18n plugin that provides `$t()`, `$tc()`, `$getLocale()`,
|
|
219
228
|
* `$switchLocale()`, and other runtime helpers.
|
|
@@ -631,6 +640,8 @@ export interface ModuleOptionsExtend extends ModuleOptions {
|
|
|
631
640
|
disablePageLocales: boolean;
|
|
632
641
|
/** Resolved flag: whether locale-based redirects are enabled. */
|
|
633
642
|
redirects?: boolean;
|
|
643
|
+
/** Resolved flag: whether a locale prefix in another case or encoding redirects to its own spelling. */
|
|
644
|
+
prefixCaseRedirect?: boolean;
|
|
634
645
|
/** Resolved translation payload loading strategy. */
|
|
635
646
|
translationPayloadMode?: 'premerged' | 'source';
|
|
636
647
|
/** Premerged files are in `public/`, so they can sit on `app.cdnURL`. */
|