title: In Java dynamically add string with properties file message?
body: <p>I am able to read the message from properties file where i added all messages with <code>key/value</code> pair</p>
  
  <pre><code>message.template.success.equipment.create = Equipment template created successfully
  message.template.success.equipment.create.termination = Termination template created successfully
  message.template.success.equipment.update = Equipment template updated successfully
  message.template.success.termination.update = Termination template updated successfully
  </code></pre>
  
  <p>for reading message from the properties file i have create a class with following code</p>
  
  <pre><code>public class PropertyReader {
  
      private static PropertyReader instance = null;
      private ResourceBundle bundleResource;
      private ResourceBundle bundleResourceMenu;
      private ResourceBundle bundleResourceMessage;
      private static final Logger log = Logger.getLogger(PropertyReader.class);
  
      private PropertyReader() {}
  
      private PropertyReader(Locale locale) {
          log.info("Property Reader loading files with locale : "+locale.getLanguage());
          bundleResourceMenu = ResourceBundle.getBundle("bsm-portal-menu",locale);
          bundleResource = ResourceBundle.getBundle("bsmResource",locale);
          bundleResourceMessage = ResourceBundle.getBundle("bsm-portal-message",locale);
          log.info("**** BundleResourceMessage *****");
  
      }
  
      public static synchronized PropertyReader getInstance(Locale locale) {
          if (instance == null)
              instance = new PropertyReader(locale);
          return instance;
      }
  
  
      public String getBundleResource(String propKey) {
          return this.bundleResource.getString(propKey);
      }
  
      public String getBundleResourceMenu(String propKey) {
          return this.bundleResourceMenu.getString(propKey);
      }
  
      public String getBundleResourceMessage(String propKey) {
          return this.bundleResourceMessage.getString(propKey);
      }
  
  
  }
  </code></pre>
  
  <p>Upto this everything fine.</p>
  
  <p>Now i have want to make these type of message dynamic </p>
  
  <pre><code> message = "Entities " + appenMessage.toString() + " are already added in another association";
  </code></pre>
  
  <p>here <code>appenMessage</code> variable have a dynamically generated String value which i have to append with message.It is possible to incorporate such kind with properties file ?</p>