code: private String getOptionsForLanguage(Locale setLocale) {
  
          // get available locales from the workplace manager
          List<Locale> locales = OpenCms.getWorkplaceManager().getLocales();
          StringBuffer resultBuffer = new StringBuffer();
          int counter = 0;
          Iterator<Locale> i = locales.iterator();
          while (i.hasNext()) {
              Locale currentLocale = i.next();
              // add all locales to the select box
              String language = currentLocale.getDisplayLanguage(setLocale);
              if (CmsStringUtil.isNotEmpty(currentLocale.getCountry())) {
                  language = language + " (" + currentLocale.getDisplayCountry(setLocale) + ")";
              }
              if (CmsStringUtil.isNotEmpty(currentLocale.getVariant())) {
                  language = language + " (" + currentLocale.getDisplayVariant(setLocale) + ")";
              }
              if (counter != 0) {
                  resultBuffer.append("|");
              }
              resultBuffer.append(currentLocale.toString()).append(":").append(language);
              counter++;
          }
          return resultBuffer.toString();
      }
docs: Gets the options for the language selector.<p>
  
  @param setLocale the locale for the select options
  
  @return the options for the language selector