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

LocalizedLink either adding two slashes or viewing link as the locale prefix #9

Closed
hzuber-vayyar opened this issue Jun 9, 2020 · 5 comments

Comments

@hzuber-vayyar
Copy link

In gastby-config :

      resolve: `gatsby-plugin-internationalization`,
      options: {
        locales: ["en", "us-es", "eu-es", "uk", "eu", "de", "ca", "au"],
        defaultLocale: "en",
      },
    },

If I write my LocalizedLink as to="/home", on my default locale it will link correctly, but on any other locale it will have two slashes (ie "de//home"). If I write the LocalizedLink as to="home", on the other locales it will link correctly, but say if I want to link from /home to /about, I end up getting routed to "/home/about". Any ideas? I don't have any routers, just using nested folders in pages, if that makes a difference.

@herecydev
Copy link
Owner

Hey there, this used to work just fine but it looks like Gatsby has very recently changed it's implementation around slashes. gatsbyjs/gatsby#24054

I'll take a look at this tonight and try to get a fix out.

@hzuber-vayyar
Copy link
Author

hzuber-vayyar commented Jun 9, 2020 via email

@herecydev
Copy link
Owner

I've just pushed a new version 0.13.0, if you make sure you've updated that I'm pretty certain that'll fix your issue 🤞 let me know how it goes!

@hzuber-vayyar
Copy link
Author

hzuber-vayyar commented Jun 10, 2020 via email

@herecydev
Copy link
Owner

You're most welcome

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