code: public static IndexedContainer getLanguageContainer(String captionPropertyName) {
  
          IndexedContainer result = new IndexedContainer();
          result.addContainerProperty(captionPropertyName, String.class, "");
  
          Iterator<Locale> itLocales = OpenCms.getLocaleManager().getAvailableLocales().iterator();
          while (itLocales.hasNext()) {
              Locale locale = itLocales.next();
              Item item = result.addItem(locale);
              item.getItemProperty(captionPropertyName).setValue(locale.getDisplayName(A_CmsUI.get().getLocale()));
          }
  
          return result;
  
      }
docs: Get container with languages.<p>
  
  @param captionPropertyName name
  @return indexed container