code: public void actionDeleteElementLocale() throws JspException {
  
          try {
              Locale loc = getElementLocale();
              m_content.removeLocale(loc);
              //write the modified xml content
              writeContent();
              List<Locale> locales = m_content.getLocales();
              if (locales.size() > 0) {
                  // set first locale as new display locale
                  Locale newLoc = locales.get(0);
                  setParamElementlanguage(newLoc.toString());
                  m_elementLocale = newLoc;
              } else {
                  if (LOG.isErrorEnabled()) {
                      LOG.error(Messages.get().getBundle().key(Messages.LOG_GET_LOCALES_1, getParamResource()));
                  }
              }
  
          } catch (CmsXmlException e) {
              // an error occurred while trying to delete the locale, stop action
              showErrorPage(e);
          } catch (CmsException e) {
              // should usually never happen
              if (LOG.isInfoEnabled()) {
                  LOG.info(e.getLocalizedMessage(), e);
              }
          }
      }
docs: Performs the delete locale action.<p>
  
  @throws JspException if something goes wrong