code: public void actionChangeElementLanguage() {
  
          // save eventually changed content of the editor
          Locale oldLocale = CmsLocaleManager.getLocale(getParamOldelementlanguage());
          Locale newLocale = getElementLocale();
          try {
              setEditorValues(oldLocale);
              if (!m_content.validate(getCms()).hasErrors(oldLocale)) {
                  // no errors found in content
                  if (!m_content.hasLocale(newLocale)) {
                      // check if we should copy the content from a default locale
                      boolean addNew = true;
                      List<Locale> locales = OpenCms.getLocaleManager().getDefaultLocales(getCms(), getParamResource());
                      if (locales.size() > 1) {
                          // default locales have been set, try to find a match
                          try {
                              m_content.copyLocale(locales, newLocale);
                              addNew = false;
                          } catch (CmsXmlException e) {
                              // no matching default locale was available, we will create a new one later
                          }
                      }
                      if (addNew) {
                          // create new element if selected language element is not present
                          try {
                              m_content.addLocale(getCms(), newLocale);
                          } catch (CmsXmlException e) {
                              if (LOG.isErrorEnabled()) {
                                  LOG.error(e.getLocalizedMessage(), e);
                              }
                          }
                      }
                  }
                  //save to temporary file
                  writeContent();
                  // set default action to suppress error messages
                  setAction(ACTION_DEFAULT);
              } else {
                  // errors found, switch back to old language to show errors
                  setParamElementlanguage(getParamOldelementlanguage());
                  // set stored locale to null to reinitialize it
                  m_elementLocale = null;
              }
          } catch (Exception e) {
              // should usually never happen
              if (LOG.isInfoEnabled()) {
                  LOG.info(e.getLocalizedMessage(), e);
              }
          }
      }
docs: Performs the change element language action of the editor.<p>