code: public static Locale selectLocale(Locale vrloc, Object loc, UIComponent comp) {
  		java.util.Locale selLocale = vrloc;
  
  		if (loc != null) {
  			if (loc instanceof String) {
  				selLocale = BsfUtils.toLocale((String) loc);
  			} else if (loc instanceof java.util.Locale) {
  				selLocale = (java.util.Locale) loc;
  			} else {
  				throw new IllegalArgumentException(
  						"Type:" + loc.getClass() + " is not a valid locale type for " + comp.getFamily() + ":" + comp.getClientId());
  			}
  		}
  
  		return selLocale;
  	}
docs: Pass facesContext.getViewRoot().getLocale() and attrs locale value