-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Components in wrapPageElement cannot access the current locale #138
Comments
I am hitting the same issue, within the Layout it seems getting |
after a look the code at https://github.com/gatsbyjs/themes/blob/master/packages/gatsby-theme-i18n/src/wrap-page-element.js ; I believe the reason is I strongly believe this plugin should use https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#wrapRootElement instead of BTW, it looks like this repo has many months issues and many PRs pending for months, wonder is it going out of maintenance? from this contributors graph it looks like very low activity since this year 2021 comparing last year I'd like to make a PR to here but will need some maintainer's response anyway; /cc @LekoArts @theowenyoung ... |
Any updates on this? It looks like the Gatsby team is not very interested in supporting themes. |
I use a Layout Component with a navigation Bar. It is present at every route, so I put it at
gatsby-browser.js
like soNo problem so far.
If I try to get the locale in the
Layout
throughconst { locale } = useLocalization();
I get the wrong locale. This means that my Links redirect wrongly. Am I doing something wrong, or is this a bug?Cheers
The text was updated successfully, but these errors were encountered: