code: public static String i18n(ResourceBundle messages, String key, Object... messageArguments) {
      MessageFormat formatter = new MessageFormat("");
      formatter.applyPattern(messages.getString(key).replaceAll("'", "''"));
      return formatter.format(messageArguments);
    }
docs: Translate a text string based on our i18n files.
  @since 3.1