public Locale getLocale ( ) { UI currentUI = UI . getCurrent ( ) ; Locale locale = currentUI == null ? null : currentUI . getLocale ( ) ; if ( locale == null ) { locale = Locale . getDefault ( ) ; } return locale ; }
Gets the locale of the current Vaadin UI . If the locale can not be determinted the default locale is returned instead .