return facesContext.getApplication().getViewHandler().calculateLocale( facesContext);
Locale locale = facesContext.getApplication().getViewHandler() .calculateLocale(facesContext); if (LOG.isDebugEnabled()) { LOG.debug("Calculate locale from view handler: " + locale); }  return locale;
    public static Locale getUserLocale(FacesContext facesContext) {        if (facesContext == null) {            facesContext = FacesContext.getCurrentInstance();        }        UIViewRoot viewRoot = facesContext.getViewRoot();        if (viewRoot != null) {            Locale locale = viewRoot.getLocale();            if (locale != null) {                return locale;            }        }        return facesContext.getApplication().getViewHandler().calculateLocale(                facesContext);    }