You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2021. It is now read-only.
The LocaleObserver and MyLocale example is completely artificial. You don't set texts in your apps by creating subclass of Div for every text you wish to localize! You usually use textField.setLabel()
Best practices missing. Should I use LocaleChangeObserver or not?
Consistent overall strategy missing. Should my components respond to locale changes in UI.getCurrent() or not? If yes, then the view needs to implement LocaleChangeObserver and modify all labels, which is quite a lot of work, so probably this should be discouraged. Also it works really poorly with DatePicker since it doesn't respond to locale changes in UI.getCurrent() as seen at https://github.com/vaadin/vaadin-date-picker-flow/issues/253 . Probably a better idea is to suggest the programmer to perform page reload when UI locale changes. However, that makes LocaleChangeObserver obsolete.
Example missing on how to get timezone from the browser (Page.retrieveExtendedClientDetails()).
Best practice missing on how to apply timezone to every DateTimePicker constructed; that the timezone should be initially detected from the browser but the user might want to change that in the app's user settings.
That you should call VaadinSession.setLocale() instead of UI.setLocale().
The text was updated successfully, but these errors were encountered:
https://vaadin.com/docs/v14/flow/advanced/tutorial-i18n-localization.html
textField.setLabel()
LocaleChangeObserver
or not?Page.retrieveExtendedClientDetails()
).The text was updated successfully, but these errors were encountered: