code: protected void initBodyElementLanguage() {
  
          List<Locale> locales = m_page.getLocales();
          Locale defaultLocale = OpenCms.getLocaleManager().getDefaultLocales(getCms(), getCms().getSitePath(m_file)).get(
              0);
  
          if (locales.size() == 0) {
              // no body present, create default body
              if (!m_page.hasValue(CmsDefaultPageEditor.XML_BODY_ELEMENT, defaultLocale)) {
                  m_page.addValue(CmsDefaultPageEditor.XML_BODY_ELEMENT, defaultLocale);
              }
              try {
                  m_file.setContents(m_page.marshal());
                  getCms().writeFile(m_file);
              } catch (CmsException e) {
                  // show error page
                  try {
                      showErrorPage(this, e);
                  } catch (JspException exc) {
                      // should usually never happen
                      if (LOG.isInfoEnabled()) {
                          LOG.info(exc);
                      }
                  }
              }
              setParamElementlanguage(defaultLocale.toString());
          } else {
              // body present, get the language
              if (locales.contains(defaultLocale)) {
                  // get the body for the default language
                  setParamElementlanguage(defaultLocale.toString());
              } else {
                  // get the first body that can be found
                  setParamElementlanguage(locales.get(0).toString());
              }
  
          }
      }
docs: Initializes the body element language for the first call of the editor.<p>