I want to use internationalisation (support for multiple different languages) in a webapplication using vaadin 8. In the official documentation, I can not find anything that is supported by framework version 8. Does anybody know some example projects? Any hint would be much appreciated.
Internationalization is a common pattern in Java. You can use ResourceBundle
s as described here. Vaadin components like labels or buttons have text that you can freely set. This means, you can get a translation from your resource bundle using the locale associated to the UI
(call UI.getCurrent().getLocale()
). If you do not set the locale on the UI
yourself then Vaadin takes the language the client browser is sending which is often what you would expect as user.