\n\n\n### Additional context\n\nAt runtime the locales array is properly available see console log :\n\n\u003Cimg width=\"574\" height=\"98\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a567197b-ed0e-477c-a908-3ce9b0e47c7d\" />\n\n### Logs\n\n```shell\n\n```",[3225],{"name":3175,"color":3176},3834,"TS error: According to typeScript locales property is not exported by usei18n composable","2025-10-04T07:35:11Z","https://github.com/nuxt-modules/i18n/issues/3834",0.7421311,{"description":3232,"labels":3233,"number":3237,"owner":3178,"repository":3179,"state":3238,"title":3239,"updated_at":3240,"url":3241,"score":3242},"### Environment\n\n- Operating System: Darwin\r\n- Node Version: v18.16.0\r\n- Nuxt Version: 3.6.2\r\n- Nitro Version: 2.5.2\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: build, css, devtools, modules, nitro, postcss, routeRules, runtimeConfig\r\n- Runtime Modules: @pinia/nuxt@0.4.11, @nuxt/image@1.0.0-rc.1, nuxt-api-party@0.13.0, @nuxtjs/i18n@8.0.0-beta.13\r\n- Build Modules: -\n\n### Reproduction\n\nhttps://github.com/joeykamsteeg/nuxt3-i18n-beforelocaleswitch-hook-not-working\n\n### Describe the bug\n\nThis hook should be triggered on app load (according to the documentation) and with initialSetup property we could hook our own logic how to handle URLs without locale in the URL. This is now not possible.\r\n\r\nIssue was reported earlier (#2248) but was closed without a resolution. \n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3234],{"name":3235,"color":3236},"hook","CF3B0A",2260,"closed","Follow up: hook i18n:beforeLocaleSwitch does not use the locale that is return in the function","2025-05-22T19:39:58Z","https://github.com/nuxt-modules/i18n/issues/2260",0.71514225,{"description":3244,"labels":3245,"number":3249,"owner":3178,"repository":3179,"state":3238,"title":3250,"updated_at":3251,"url":3252,"score":3253},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.16.0\r\n- Nuxt Version: 3.7.1\r\n- CLI Version: 3.7.3\r\n- Nitro Version: 2.6.2\r\n- Package Manager: pnpm@8.6.12\r\n- Builder: -\r\n- User Config: extends, telemetry, ssr, fontMetrics, nitro, routeRules, runtimeConfig, build, modules, delayHydration, image, components, bugsnag, devtools, i18n, experimental, pwa, app, dnGraphqlClient, vite, plugins\r\n- Runtime Modules: @nuxtjs/fontaine@0.4.1, @pinia/nuxt@0.4.11, @nuxt/devtools@0.8.2, @vite-pwa/nuxt@0.1.0, nuxt-bugsnag@7.0.0, @digitalnatives/css-variables/nuxt@5.1.3, @digitalnatives/graphql-client@4.0.3, @nuxtjs/i18n@8.0.0-rc.4, @nuxt/image@1.0.0-rc.1, nuxt-delay-hydration@1.2.1, @digitalnatives/composables@2.0.1\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nA naïve reproduction is the following:\r\n\r\n```js\r\nconst route = useRoute(); \r\nconst locale = useLocale();\r\n\r\n// On switch, this will first log the NEW locale with the OLD path, then it will trigger a second time, logging the NEW locale with the NEW path\r\nwatchEffect(() => {\r\n console.log(route.fullPath);\r\n console.log(locale);\r\n});\r\n```\r\n\r\nAdd it to a global component in the layout that doesn't get mounted/umounted on URI change.\r\n\r\n\r\n\r\n### Describe the bug\r\n\r\nWhen using prefixed routes and a language switcher as described in the docs, it seems the locale changes before the route does.\r\n\r\nWhen watching the locale with `useAsyncData()` or `useLazyAsyncData()` this will cause the results of this call to be associated with the wrong URL/path, which then has a side-effect of refetching API data which was already pre-rendered in Nuxt static mode. Therefore, the pre-rendered payload is NOT used in this pattern, even though it should.\r\n\r\nI've also seen this lead to data mismatching to the wrong paths, but this is a bit harder to create a reproduction for.\r\n\r\n### Additional context\r\n\r\nMy current workaround is this;\r\n\r\ncomposable:\r\n```js\r\nexport const useVariables = () => {\r\n const route = useRoute();\r\n const { $i18n }: any = useNuxtApp();\r\n // Don't automatically update the site and url to ensure they both change at the same time\r\n variables.uri = toValue(route.path);\r\n variables.lang = toValue($i18n?.localeProperties)?.apiLanguageHandle;\r\n\r\n // Update variables manually when the route changes, at this point both the locale AND the URI are correct.\r\n watch(() => route.path, () => {\r\n variables.uri = toValue(route.path);\r\n variables.lang = toValue($i18n?.localeProperties)?.apiLanguageHandle;\r\n });\r\n return { variables };\r\n});\r\n```\r\n\r\nthen:\r\n\r\n```js\r\nconst { variables } = useVariables();\r\nuseAsyncData(() => { console.log('trigger!') } , { watch: [ variables ] });\r\n```\r\n\r\n\r\nPerhaps it would be possible to inject the locale & locale properties into the localized route meta? That way we could just watch the route and apply the language from that.\r\n\r\nRelates to #2278 \r\n\r\n### Logs\r\n\r\n_No response_",[3246],{"name":3247,"color":3248},"switch locale","D2FCC6",2377,"`locale` changes BEFORE the route path does, which causes issues with (static) `asyncData`-payloads","2025-05-16T11:44:11Z","https://github.com/nuxt-modules/i18n/issues/2377",0.7167044,{"description":3255,"labels":3256,"number":3260,"owner":3178,"repository":3179,"state":3238,"title":3261,"updated_at":3262,"url":3263,"score":3264},"Not sure if it's a `pinia` issue, a `@nuxtjs/i18n` issue, or a me issue.\nCurrently, if I use `const { t } = useI18n()` inside a Pinia store, I get:\n> Must be called at the top of a setup function\n\nI am using a Pinia `setup` store, and the Pinia setup documentation says:\n> When defining a setup store, you can use almost any composable since every property gets discerned into state, action, or getter:\n\nWhat I don't understand:\n1. `Must be called at the top`, it's the first line of my setup store.\n1. `of a `setup` function`, it's a setup store, so I should be able to use composable inside it.\n\nLinking this discussion:\nhttps://github.com/vuejs/pinia/discussions/2938",[3257],{"name":3258,"color":3259},"need reproduction","CD234A",3451,"Usage of `useI18n()` composable inside Pinia store","2025-05-23T08:28:10Z","https://github.com/nuxt-modules/i18n/issues/3451",0.7180484,{"description":3266,"labels":3267,"number":3274,"owner":3178,"repository":3179,"state":3238,"title":3275,"updated_at":3276,"url":3277,"score":3278},"### Environment\n\n- Operating System: Darwin\r\n- Node Version: v20.11.0\r\n- Nuxt Version: 3.10.1\r\n- CLI Version: 3.10.0\r\n- Nitro Version: 2.8.1\r\n- Package Manager: yarn@4.0.1\r\n- Builder: -\r\n- User Config: modules, i18n, devtools\r\n- Runtime Modules: @nuxtjs/i18n@8.1.0\r\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-c7te5q-j2hjui?file=app.vue\n\n### Describe the bug\n\nAlso if i don't set `useLocaleHead()` with `useHead`, `setI18nParams` automatically adds `\u003Clink rel=\"alternate\" />` and `og:property`. \r\n\r\n```html\r\n\u003Clink id=\"i18n-alt-it\" rel=\"alternate\" href=\"https://www.dummy.com/it/blog-1-it\" hreflang=\"it\">\r\n\u003Clink id=\"i18n-alt-de\" rel=\"alternate\" href=\"https://www.dummy.com/de/blog-1-de\" hreflang=\"de\">\r\n\u003Clink id=\"i18n-xd\" rel=\"alternate\" href=\"https://www.dummy.com/it/blog-1-it\" hreflang=\"x-default\">\r\n\u003Clink id=\"i18n-can\" rel=\"canonical\" href=\"https://www.dummy.com/it/blog-1-ita\">\r\n\u003Cmeta id=\"i18n-og-url\" property=\"og:url\" content=\"https://www.dummy.com/it/blog-1-ita\">\r\n\u003Cmeta id=\"i18n-og\" property=\"og:locale\" content=\"it\">\r\n\u003Cmeta id=\"i18n-og-alt-en\" property=\"og:locale:alternate\" content=\"en\">\r\n\u003Cmeta id=\"i18n-og-alt-de\" property=\"og:locale:alternate\" content=\"de\">\r\n```\n\n### Additional context\n\nWow, that's good, but why only whit `setI18nParams` and not in the othter pages? If i don't use `setI18nParams` i have to set all this code on `App.vue`\r\n```js\r\nconst localeHead = useLocaleHead({\r\n addSeoAttributes: true,\r\n addDirAttribute: true,\r\n})\r\n\r\nuseHead({\r\n htmlAttrs: () => localeHead.value.htmlAttrs ?? {},\r\n link: () => localeHead.value.link ?? [],\r\n meta: () => localeHead.value.meta ?? []\r\n})\r\n```\r\n\r\nSo either everything is handled automatically or everything is handled via the mix of `useLocaleHead` and `useHead`\n\n### Logs\n\n_No response_",[3268,3271],{"name":3269,"color":3270},"🍰 p2-nice-to-have","0e8a16",{"name":3272,"color":3273},"scope: seo","30CDE0",2780,"`setI18nParams` automatically adds `\u003Clink rel=\"alternate\" />`","2025-05-25T10:23:03Z","https://github.com/nuxt-modules/i18n/issues/2780",0.7240327,{"description":3280,"labels":3281,"number":3285,"owner":3178,"repository":3179,"state":3238,"title":3286,"updated_at":3287,"url":3288,"score":3289},"### Environment\n\n- Operating System: Linux\n- Node Version: v22.17.1\n- Nuxt Version: 4.0.1\n- CLI Version: 3.26.4\n- Nitro Version: 2.12.3\n- Package Manager: bun@1.2.19\n- Builder: -\n- User Config: devtools, experimental, typescript, sourcemap, vite, ssr, compatibilityDate, modules, runtimeConfig, css, app, compodium, image, fonts, ogImage, icon, colorMode, ui, seo, sentry, openFetch, oidc, vitalizer, security, i18n, vue, routeRules, $development, $production, $env\n- Runtime Modules: ~/modules/tenancy, ~/modules/lodash, magic-regexp/nuxt@0.10.0, motion-v/nuxt@1.6.0, nuxt-prepare@2.3.2, nuxt-vitalizer@0.10.0, nuxt-open-fetch@0.13.0, nuxt-security@2.3.0, nuxt-authorization@0.3.5, nuxt-oidc-auth@1.0.0-beta.5, @formkit/auto-animate/nuxt@0.8.2, @vueuse/nuxt@13.5.0, @pinia/nuxt@0.11.2, @nuxtjs/i18n@10.0.2, @nuxtjs/seo@3.1.0, @nuxt/test-utils@3.19.2, @nuxt/ui@3.0.2, @nuxt/image@1.10.0, @nuxt/scripts@0.11.10, @nuxt/eslint@1.7.0, @compodium/nuxt@0.1.0-beta.11, @sentry/nuxt/module@9.40.0\n- Build Modules: -\n\n### Reproduction\n\nJust open [the starter](https://stackblitz.com/fork/github/BobbieGoede/nuxt-i18n-starter/tree/v10) and try to edit a key while running the project.\n\n### Describe the bug\n\nWhen I try to edit a key (or add a new one) of any of my locales, I get this error:\n\n```\nUncaught (in promise) TypeError: can't access property \"dev\", (intermediate value)()._nuxtI18nCtx is undefined\n```\n\nThat forces me to refresh the page to update the value.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3282],{"name":3283,"color":3284},"upstream","fbca04",3758,"Can't access property `dev`, `_nuxtI18nCtx` is undefined","2025-07-24T10:12:37Z","https://github.com/nuxt-modules/i18n/issues/3758",0.72567123,["Reactive",3291],{},["Set"],["ShallowReactive",3294],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fRfSCHoyZnPsP9_3VelHdYmQDo8zhR7r0hd8alTp4J_4":-1},"/nuxt-modules/i18n/3800"]