code: public static Locale convertLocale(Object input) {
  
          Locale locale;
          if (input instanceof Locale) {
              locale = (Locale)input;
          } else {
              locale = CmsLocaleManager.getLocale(String.valueOf(input));
          }
          return locale;
      }
docs: Returns a Locale created from an Object.<p>
  
  <ul>
  <li>The Object is first checked if it is a {@link Locale} already, if so it is casted and returned.
  <li>If not, the input is transformed to a String and then a Locale lookup with this String is done.
  <li>If the locale lookup fails, the OpenCms default locale is returned.
  </ul>
  
  @param input the Object to create a Locale from
  
  @return a Locale created from the given Object