nuxt context unavailable in definePageMeta `redirect`
I'm trying to redirect the user using
I get
Is there a way to access
definePageMeta and the redirect function, but my app needs i18n and when I tryI get
$localePath is not a function. If I replace const { $localePath } = useNuxtApp(); with const localePath = useLocalePath(); I get another error "error caught during app initialization Error: i18n context is not initialized. Ensure the i18n plugin is installed and the composable is used within a Vue component or setup function.".Is there a way to access
localePath in definePageMeta context at all ? If not, how should I tackle i18n and redirection using named routes and not absolute paths ?