Replies: 1 comment 2 replies
-
You should pass the i18n instance to the router context, then it's available in the head method via the export const Route = createFileRoute('/test')({
head: ({ match }) => ({ meta: [{ title: match.context.i18n.t('test') }] })
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using
head
like this, the title is translated correctly. However, if you change the language, the title doesn't change unless you navigate to a different route and go back to this one, or refresh the page.Seems like head tags are set only on initial route navigation and I haven't found a way to update them afterwards. Is it possible to insert dynamic values there or reset the values on language change, or should I use a different solution for head management?
Beta Was this translation helpful? Give feedback.
All reactions