Skip to content
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

Make the choice of language persistent across pages #8

Closed
tanvibhakta opened this issue Oct 31, 2018 · 2 comments
Closed

Make the choice of language persistent across pages #8

tanvibhakta opened this issue Oct 31, 2018 · 2 comments

Comments

@tanvibhakta
Copy link

What is happening now

When I select 'de' the content on this page changes. However, when I navigate to a different oage via the link, my language setting isn't persistent, ie I have to select what language I want for every single page.

What should happen

I should be able to select the language once and have this stay the same for me across teh entire website.

@mccrodp
Copy link
Owner

mccrodp commented Nov 9, 2018

Hey, thanks for the issue. I haven't gotten a change to use this for a while. Actually, considering moving to use Strapi, so I might not update this repo any time soon, but PRs are welcome!

when I navigate to a different oage via the link, my language setting isn't persistent
You need to make your nav links prefixed with the selected locale in your components, then it'll persist.

Pretend the links on the pages are the nav there and you'll see that they are calculated based on the chosen locale, just do that in your Menu component for example.
https://gatsby-starter-contentful-i18n.netlify.com/en-US/

@mccrodp
Copy link
Owner

mccrodp commented Jan 4, 2019

@tanvibhakta, just upgraded this to Gatsby V2, so closing this now 😄

@mccrodp mccrodp closed this as completed Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants