private Locale getLocale ( final FacesContext context , final UIComponent component ) { String localeStr = ( String ) component . getAttributes ( ) . get ( TieConstants . COMPONENT_ATTR_LOCALE ) ; if ( localeStr == null ) { return context . getViewRoot ( ) . getLocale ( ) ; } return Locale . forLanguageTag ( localeStr ) ; }
Gets the locale .