fix(02): resolve 3 typecheck errors and i18n langDir path

- useSetLocale → destructured setLocale from useI18n()
- addSeoAttributes → seo option for useLocaleHead()
- process.env → import.meta.env for Nuxt compatibility
- langDir: 'locales/' → 'app/locales/' (Nuxt 4 resolves from project root)
This commit is contained in:
2026-04-08 16:31:58 +02:00
parent d424084b46
commit 2332c69557
6 changed files with 176 additions and 16 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ export default defineNuxtConfig({
{ code: 'fr', language: 'fr-FR', file: 'fr.json' },
{ code: 'en', language: 'en-US', file: 'en.json' },
],
langDir: 'locales/',
langDir: 'app/locales/',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',
@@ -51,6 +51,6 @@ export default defineNuxtConfig({
},
gtag: {
id: '',
enabled: process.env.NODE_ENV === 'production',
enabled: import.meta.env.NODE_ENV === 'production',
}
})