Translated URLs receive a "404 error page not found" when the language is switched

Hello to you all,

I’m still learning because I’m still alive - wish you all the very best.

After my initial problems with internationalization, I made a small module and it works exactly as I wanted it to. Today I finally implemented the translation of the url’s which also works perfectly. As soon as you do something right, it works … However, while testing around and switching the language I noticed: Whenever I change the language on a page I get an “Error 404 Page not found”.

Is this supposed to be the case? What can I do about it?

Providing the language module controller with the last URL, translating the URL components when the language is changed and redirecting the user comes to mind, but I would like to manage this without the use of another cookie and without using a session. Because cookies are very unpalatable in Germany, the data protection guidelines are super exhausting and all this now for 3 genders, please -.-

sometimes … question can be closed have a good night. Catch the url the request have and so on …