What is the preferred way to get the selected language in the backend from a JHipster app?
I've found this answer, but the described method does not work anymore, because the Language Service does not exist.
Another approach I tried was the LocaleConfiguration
class, which uses a cookie to get the language. But I had to find out, that the cookie is not being set. So this class is useless.
Furthermore no requests are being sent to the backend if the language changes. The only thing happening is that the language is being stored in a SessionStorageService
.
What is the preferred way to get the language in the backend? Should I manually set the cookie and use the class described above or access the session storage somehow? Should I send a request every time the language is changed and store that in the DB (jhipster user entity has a language column)? Or should I do something different?