code: public static MessageFormat pluralizeFormat(final String pattern, final String... choices)
      {
          double[] indexes = new double[choices.length];
  
          for (int i = 0; i < choices.length; i++)
          {
              indexes[i] = i;
          }
  
          ChoiceFormat choiceForm = new ChoiceFormat(indexes, choices);
          MessageFormat format = (MessageFormat) messageFormat(pattern).clone();
          format.setFormat(0, choiceForm);
  
          return format;
      }
docs: <p>
  Constructs a message with pluralization logic by the means of
  ChoiceFormat.
  </p>
  
  @param pattern
  Base pattern
  @param choices
  Values that match the pattern
  @return Message instance prepared to generate pluralized strings