code: protected void initTemplatesForResourceBundles(Map<String, NlsTemplate> map) {
  
      List<ResourceBundle> bundles = this.resourceBundleLocator.findBundles();
      for (ResourceBundle resourceBundle : bundles) {
        String name = resourceBundle.getBaseBundleName();
        if (name == null) {
          name = resourceBundle.getClass().getName();
        }
        Enumeration<String> keyEnum = resourceBundle.getKeys();
        while (keyEnum.hasMoreElements()) {
          String key = keyEnum.nextElement();
          String message = resourceBundle.getString(key);
          NlsTemplateImplWithMessage template = new NlsTemplateImplWithMessage(name, key, message);
          map.put(message, template);
        }
      }
    }
docs: This method initializes the {@link NlsTemplate}s for reverse lookup for {@link ResourceBundle}s.
  
  @param map the {@link Map} where to {@link Map#put(Object, Object) register} the {@link NlsTemplate}s by
  their {@link net.sf.mmm.util.nls.api.NlsMessage#getInternationalizedMessage() i18n message}.