Hello,
thank you for your answer. The code I showed is inside the event handler of a button. So when the user presses the "German" button on the page, this code is executed. I do not want the user to press this button again on every page that he navigates to
I think what happens is that as soon as the user navigates to another page, the browser local from the request is used again, but I did not find a way to set this locale.
Is there really no way to set the locale permanently for a user session?
Another question: Is it possible to get an event as soon as a page is displayed, then I could of course this code from this event handler, although I still think it would be nicer to set the locale permanently for a session.