code: public String buildSelectLocales(String attributes) {
  
          List options = new ArrayList();
          List values = new ArrayList();
          List locales = OpenCms.getLocaleManager().getAvailableLocales();
          int selectedIndex = -1;
          if (locales == null) {
              // no locales found, return empty String
              return "";
          } else {
              // locales found, create option and value lists
              CmsMessages messages = Messages.get().getBundle(getLocale());
              options.add(messages.key(Messages.GUI_PLEASE_SELECT_0));
              values.add("");
              options.add(messages.key(Messages.GUI_BUTTON_ALL_0));
              values.add(ALL);
              if (ALL.equals(getParamLocale())) {
                  selectedIndex = 1;
              }
              Iterator i = locales.iterator();
              int counter = 2;
              while (i.hasNext()) {
                  Locale locale = (Locale)i.next();
                  String language = locale.getLanguage();
                  String displayLanguage = locale.getDisplayLanguage();
                  if (language.equals(getParamLocale())) {
                      selectedIndex = counter;
                  }
                  options.add(displayLanguage);
                  values.add(language);
                  counter++;
              }
          }
  
          return CmsWorkplace.buildSelect(attributes, options, values, selectedIndex, false);
      }
docs: Builds the html for the available locales select box.<p>
  
  @param attributes optional attributes for the &lt;select&gt; tag
  
  @return the html for the available locales select box