code: public void actionUpdateLanguages() throws JspException {
  
          if ((m_paramSelectedLanguages != null) && !m_paramSelectedLanguages.isEmpty()) {
              try {
                  CmsFile file = getCms().readFile(getParamTempfile(), CmsResourceFilter.IGNORE_EXPIRATION);
                  CmsXmlContent content = CmsXmlContentFactory.unmarshal(getCms(), file);
  
                  List<Locale> toLocales = new ArrayList<Locale>();
                  for (Iterator<String> i = m_paramSelectedLanguages.iterator(); i.hasNext();) {
                      String language = i.next();
                      toLocales.add(CmsLocaleManager.getLocale(language));
                  }
  
                  // now transfer the contents
                  transferContents(content, getElementLocale(), toLocales);
  
                  // write the temporary file
                  String decodedContent = content.toString();
                  try {
                      file.setContents(decodedContent.getBytes(content.getEncoding()));
                  } catch (UnsupportedEncodingException e) {
                      throw new CmsException(
                          Messages.get().container(Messages.ERR_INVALID_CONTENT_ENC_1, getParamResource()),
                          e);
                  }
                  // the file content might have been modified during the write operation
                  CmsObject cloneCms = OpenCms.initCmsObject(getCms());
                  CmsUUID tempProjectId = OpenCms.getWorkplaceManager().getTempFileProjectId();
                  cloneCms.getRequestContext().setCurrentProject(getCms().readProject(tempProjectId));
                  cloneCms.writeFile(file);
  
              } catch (Throwable e) {
                  // show error dialog
                  setParamMessage(Messages.get().getBundle(getLocale()).key(Messages.ERR_UPDATE_LANGUAGES_0));
                  includeErrorpage(this, e);
              }
          }
      }
docs: Updates the languages of the current xmlcontent by copying from the current language.<p>
  
  @throws JspException if there is an error including the error page