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

useSetI18nParams should also support translation of query args #3377

Open
3 of 4 tasks
Tofandel opened this issue Feb 25, 2025 · 0 comments
Open
3 of 4 tasks

useSetI18nParams should also support translation of query args #3377

Tofandel opened this issue Feb 25, 2025 · 0 comments

Comments

@Tofandel
Copy link

Tofandel commented Feb 25, 2025

Describe the feature

Query args and parameters are pretty much equivalent when it comes to routing

I believe we should be able to translate query args as well the same way we can translate route params

const setI18nParams = useSetI18nParams({
  translatedQuery: ['minPrice', 'maxPrice'],
});

// /en/page?minPrice=10

setI18nParams({
  'hu': { minPrice: 300 }
});

// /hu/page?minPrice=300

It probably goes the same for the hash but that one is a bit more problematic than query args because the hash is not transmitted to the server, causing hydration issues as only the frontend is able to access it

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants