code: private void addMessagesToVfsBundle(Map<String, String> messages, CmsFile vfsBundleFile) throws CmsException {
  
          lockTemporary(vfsBundleFile);
          CmsObject cms = m_cms;
          CmsXmlContent content = CmsXmlContentFactory.unmarshal(cms, vfsBundleFile);
          Locale locale = CmsLocaleManager.getDefaultLocale();
          if (!content.hasLocale(locale)) {
              content.addLocale(cms, locale);
          }
          Element root = content.getLocaleNode(locale);
          for (Entry<String, String> entry : messages.entrySet()) {
              Element message = root.addElement(CmsVfsBundleLoaderXml.N_MESSAGE);
              Element key = message.addElement(CmsVfsBundleLoaderXml.N_KEY);
              key.setText(entry.getKey());
              Element value = message.addElement(CmsVfsBundleLoaderXml.N_VALUE);
              value.setText(entry.getValue());
          }
          content.initDocument();
          vfsBundleFile.setContents(content.marshal());
          cms.writeFile(vfsBundleFile);
      }
docs: Adds the given messages to the vfs message bundle.<p>
  
  @param messages the messages
  @param vfsBundleFile the bundle file
  
  @throws CmsException if something goes wrong writing the file