- * need special number formatting, you have to explicitly specify a
- * <code>NumberFormat</code> for the <code>PluralFormat</code> to use.
- * </p>
- * Example
- * <pre>
- * UErrorCode status = U_ZERO_ERROR;
- * MessageFormat* msgFmt = new MessageFormat(UnicodeString("{0, plural,
- * one{{0, number, C''est #,##0.0# fichier}} other {Ce sont # fichiers}} dans la liste."),
- * Locale("fr"), status);
- * if (U_FAILURE(status)) {
- * return;
- * }
- * Formattable args1[] = {(int32_t)0};
- * Formattable args2[] = {(int32_t)3};
- * FieldPosition ignore(FieldPosition::DONT_CARE);
- * UnicodeString result;
- * msgFmt->format(args1, 1, result, ignore, status);
- * cout << result << endl;
- * result.remove();
- * msgFmt->format(args2, 1, result, ignore, status);
- * cout << result << endl;
- * </pre>
- * Produces the output:<br/>
- * <code>C'est 0,0 fichier dans la liste.</code><br/>
- * <code>Ce sont 3 fichiers dans la liste."</code>
- * <p>
- * <strong>Note:</strong><br/>
- * Currently <code>PluralFormat</code>
- * does not make use of quotes like <code>MessageFormat</code>.
- * If you use plural format strings with <code>MessageFormat</code> and want
- * to use a quote sign "<code>'</code>", you have to write "<code>''</code>".
- * <code>MessageFormat</code> unquotes this pattern and passes the unquoted
- * pattern to <code>PluralFormat</code>. It's a bit trickier if you use
- * nested formats that do quoting. In the example above, we wanted to insert
- * "<code>'</code>" in the number format pattern. Since
- * <code>NumberFormat</code> supports quotes, we had to insert
- * "<code>''</code>". But since <code>MessageFormat</code> unquotes the
- * pattern before it gets passed to <code>PluralFormat</code>, we have to
- * double these quotes, i.e. write "<code>''''</code>".