question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

query string is disappear after change language when localeSubpaths is true

See original GitHub issue

When I enable localeSubpaths. If I change language, the query string will be removed from the url.

Expected behavior

  1. Start on the url like http://localhost:3000/?foo=123
  2. Change language by using i18n.changeLanguage('de')
  3. The url will changed to http://localhost:3000/de/?foo=123

Actual behavior

  1. Start on the url like http://localhost:3000/?foo=123
  2. Change language by using i18n.changeLanguage('de')
  3. The url will changed to http://localhost:3000/de/

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
ngocketitcommented, Jan 25, 2019

While this may be a bit different but in my case, I need to have different query for different languages. For example, the slug will be language specific, e.g, /en/english-slug and /de/german-slug. Currently, when changing the language, only the langcode is changed but the query remains the same. Is there any way I could achieve that?

1reaction
vimutti77commented, Jan 24, 2019

@capellini I can confirm that this problem is solved by #96. Thank!

Read more comments on GitHub >

github_iconTop Results From Across the Web

query string is disappear after change language ... - GitHub
When I enable localeSubpaths . If I change language, the query string will be removed from the url. Expected behavior.
Read more >
Query String Parameters are getting disappeared after page is ...
I am opening a browser using URL and I am manually putting my query parameters along with the url of the webpage ...
Read more >
@kichiyaki/next-i18next - npm package | Snyk
In the past month we didn't find any pull request activity or change in issues status has been detected for the GitHub repository....
Read more >
Query string parameters disappear - Anvil Works
Hello. I am self-hosting an anvil app. When I put url query strings (e.g. https://some_url.com?key=value), they get removed from the URL and ...
Read more >
The easiest way to translate your NextJs app - Morioh
Note: You can pass shallowRender: true into config options to avoid triggering getInitialProps when changeLanguage method is invoked. That's it! Your app is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found