Localisation of system messages

As described in the documentation it is possible in Vaadin to override the system messages using the method getService().setSystemMessagesProvider.

I’m working on a multilanguage web application and would like to show the “session expired” message in the language of the user(using AbstractComponent.getLocale()) but the servletInitialized is not within the context of a user session. I know there is a session because it just expired :slight_smile:

It would be nice if the system messages were defined in standard java resource bundle properties files (like javax.validation does). This way translations could be described using the standard i18n mechanisms of java.

But in the meantime: is there a way to display a system message in the language choosen by the user?

You can check the “Accept-Language”-header and use a fitting locale…

I have the same problem.
In the init(VaadinRequest request) I localized the SystemMessages. My app has 4 different languages and after selecting a new language then I localized the SystemMessages again. And what happens?

The first user X logins and chooses the English. The system messages change to English. Then a second user Y logins and chooses the French. The system messages change to French. And now when X’s session expires the system message is French even though all the other labels and so on are English! This is because the system messages are in application level. Is there any way to change it?

I have the same problem. Of course most users accept english messages. But sometimes nls support would be great for system messages. Are there any working solutions?

Thanks a lot,
Thomas