code: @Deprecated
      public static Locale getLocale() {
          Locale locale = null;
          FacesContext facesContext = FacesContext.getCurrentInstance();
  
          if (facesContext != null && facesContext.getViewRoot() != null) {
              locale = facesContext.getViewRoot().getLocale();
  
              if (locale == null) {
                  locale = Locale.getDefault();
              }
          }
          else {
              locale = Locale.getDefault();
          }
          return locale;
      }
docs: TODO If PF would change their method to public access we could use that