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

default language without lang prefix #123

Open
makho-kit opened this issue Apr 17, 2020 · 2 comments
Open

default language without lang prefix #123

makho-kit opened this issue Apr 17, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@makho-kit
Copy link

How is it possible to have a default language without language path prefix?
For example:

https://gatsby-starter-i18n-bulma.netlify.com/ < English default
https://gatsby-starter-i18n-bulma.netlify.com/it/ < Italy

@kalwalt kalwalt self-assigned this Apr 17, 2020
@kalwalt kalwalt added the question Further information is requested label Apr 17, 2020
@kalwalt
Copy link
Owner

kalwalt commented Apr 17, 2020

Hi @makhokey It was possible with the gatsby-plugin-i18n honestly i don't know if you can with my modifies, at least i need to check, because i never tried.

@wc-lei
Copy link

wc-lei commented Jun 1, 2020

@makhokey I think if you look at the documentation of gatsby-browser.js you will see how you can automatically redirect any "/" to "/defaultLocale". Here is an example:
exports.onClientEntry = () => { if (window.location.pathname === '/') { window.location.pathname = /en } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants