When forwarding to automatically detected language URL, query string gets lost

I have a multi-language site setup, with language auto-detection enabled. Unfortunately, when a user is forwarded to one of the versions of a page, the query string in the URL gets lost.

E.g. a link goes to /page?foo=bar. Depending on the user’s language they either go to /en/page or /de/page – but the parameter is always lost.

I feel like this shouldn’t be the case in general, but even if it is on purpose I am not sure how I can deal with this. I could start writing my own route handler and pass the parameters on from there, but then I would loose the automatic language detection, right?

It’s standard behavior that when you redirect a query string is not taken into account. Apart from the general question if it is a good idea to automatically redirect a user to a language, you can disable this feature and do your own redirection, passing on the query string.