code: private Map<String, String> buildLocalesMap() {
  
          TreeMap<String, String> localesMap = new TreeMap<String, String>();
          Iterator<Locale> it = OpenCms.getLocaleManager().getAvailableLocales().iterator();
          while (it.hasNext()) {
              Locale locale = it.next();
              localesMap.put(locale.toString(), locale.getDisplayName(getWorkplaceLocale()));
          }
          return localesMap;
      }
docs: Returns a map with the available locales.<p>
  
  The map entry key is the current locale and the value the localized nice name.<p>
  
  @return the map representation of all available locales