docs: private List<Locale> initWorkplaceLocales(CmsObject cms) {
  
          Set<Locale> locales = new HashSet<Locale>();
  
          // collect locales from the VFS
          if (cms.existsResource(CmsWorkplace.VFS_PATH_LOCALES)) {
              List<CmsResource> localeFolders;
              try {
                  localeFolders = cms.getSubFolders(CmsWorkplace.VFS_PATH_LOCALES);
              } catch (CmsException e) {
                  LOG.warn(
                      Messages.get().getBundle().key(
                          Messages.LOG_WORKPLACE_INIT_NO_LOCALES_1,
                          CmsWorkplace.VFS_PATH_LOCALES),
                      e);
                  // can not throw exception here since then OpenCms would not even start in shell mode (runlevel 2)
                  localeFolders = new ArrayList<CmsResource>();
              }
              Iterator<CmsResource> i = localeFolders.iterator();
              while (i.hasNext()) {
                  CmsFolder folder = (CmsFolder)i.next();
                  Locale locale = CmsLocaleManager.getLocale(folder.getName());
                  // add locale
                  locales.add(locale);
                  // add less specialized locale
                  locales.add(new Locale(locale.getLanguage(), locale.getCountry()));
                  // add even less specialized locale
                  locales.add(new Locale(locale.getLanguage()));
              }
          }
          // collect locales from JAR manifests
          try {
              Enumeration<URL> resources = getClass().getClassLoader().getResources(MANIFEST_RESOURCE_NAME);
  
              while (resources.hasMoreElements()) {
                  URL resUrl = resources.nextElement();
                  try {
                      Manifest manifest = new Manifest(resUrl.openStream());
                      String localeString = manifest.getMainAttributes().getValue(LOCALIZATION_ATTRIBUTE_NAME);
                      if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(localeString)) {
                          Locale locale = CmsLocaleManager.getLocale(localeString);
                          // add locale
                          locales.add(locale);
                          // add less specialized locale
                          locales.add(new Locale(locale.getLanguage(), locale.getCountry()));
                          // add even less specialized locale
                          locales.add(new Locale(locale.getLanguage()));
                      }
                  } catch (IOException e) {
                      LOG.warn(
                          "Error reading manifest from " + resUrl + " while evaluating available workplace localization.",
                          e);
                  }
              }
          } catch (IOException e) {
              LOG.error("Error evaluating available workplace localization from JAR manifests.", e);
          }
  
          // sort the result
          ArrayList<Locale> result = new ArrayList<Locale>();
          result.addAll(locales);
          Collections.sort(result, CmsLocaleComparator.getComparator());
          return result;
      }