code: public String getFormattedMessage(String key, Object[] args, String defaultString) {
          try {
              String result = getString(key);
              return MessageFormat.format(result, args);
          } catch (MissingResourceException e) {
              return MessageFormat.format(defaultString, args);
          }
      }
docs: An easy way to pass variables into the messages. Provides a
  consistent way of formatting the {0} type parameters. Returns
  the formatted resource, or if it is not found, the formatted
  default string that was passed in.
  
  @param key Resource lookup key
  @param args Variables to insert into the string.
  @param defaultString Default string to use if the resource
  is not found.