diff --git a/docs/content/docs/5.v9/4.api/3.compiler-macros.md b/docs/content/docs/5.v9/4.api/3.compiler-macros.md index 951c5f74c..26c85f294 100644 --- a/docs/content/docs/5.v9/4.api/3.compiler-macros.md +++ b/docs/content/docs/5.v9/4.api/3.compiler-macros.md @@ -25,8 +25,8 @@ defineI18nRoute({ defineI18nRoute(route: I18nRoute | false) => void interface I18nRoute { - paths?: Record - locales?: string[] + paths?: Record + locales?: Locale[] } ``` @@ -42,12 +42,12 @@ An object accepting the following i18n route settings: - **`paths`** - - **Type**: `Record` + - **Type**: `Record` Customize page component routes per locale. You can specify static and dynamic paths for vue-router. - **`locales`** - - **Type**: `string[]` + - **Type**: `Locale[]` Some locales to which the page component should be localized. diff --git a/src/runtime/composables/index.ts b/src/runtime/composables/index.ts index 0e833679b..a62ece83a 100644 --- a/src/runtime/composables/index.ts +++ b/src/runtime/composables/index.ts @@ -401,7 +401,6 @@ export function useBrowserLocale(): string | null { const headers = useRequestHeaders(['accept-language']) return ( findBrowserLocale( - normalizedLocales as LocaleObject[], import.meta.client ? (navigator.languages as string[]) : parseAcceptLanguage(headers['accept-language'] || '') ) || null @@ -468,7 +467,7 @@ export interface I18nRoute { * * @description You can specify static and dynamic paths for vue-router. */ - paths?: Partial> + paths?: Partial> /** * Some locales to which the page component should be localized. */