From 36bffbd0abe3b8e8f7854e9e5bf21240ce8a9692 Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Sun, 8 Sep 2024 17:47:58 +0200 Subject: [PATCH] Fixed nuxt i18n cookie config --- i18n.config.ts | 3 ++- nuxt.config.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/i18n.config.ts b/i18n.config.ts index 3c8d53a..a28dd38 100644 --- a/i18n.config.ts +++ b/i18n.config.ts @@ -1,6 +1,7 @@ export default defineI18nConfig(() => ({ legacy: false, - locale: "fr", + availableLocales: ["fr", "en"], + fallbackLocale: "fr", messages: { en: { head: { diff --git a/nuxt.config.ts b/nuxt.config.ts index c825ff5..0dadd11 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -18,8 +18,10 @@ export default defineNuxtConfig({ vueI18n: "./i18n.config.ts", detectBrowserLanguage: { useCookie: true, - cookieKey: "tttools_lang" - }, + cookieKey: "tttools_lang", + redirectOn: "all", + alwaysRedirect: true, + } }, supabase: {