code: private void replacesMessages(Map<String, String> descKeys, List<CmsResource> resources)
      throws CmsException, UnsupportedEncodingException {
  
          for (CmsResource resource : resources) {
              CmsFile file = getCms().readFile(resource);
              String encoding = CmsLocaleManager.getResourceEncoding(getCms(), file);
              String content = new String(file.getContents(), encoding);
              for (Map.Entry<String, String> entry : descKeys.entrySet()) {
                  content = content.replaceAll(entry.getKey(), entry.getValue());
              }
              file.setContents(content.getBytes(encoding));
              getCms().writeFile(file);
          }
      }
docs: Replaces the messages for the given resources.<p>
  
  @param descKeys the replacement mapping
  @param resources the resources to consult
  
  @throws CmsException if something goes wrong
  @throws UnsupportedEncodingException if the file content could not be read with the determined encoding