We're updating the issue view to help you get more done. 

MessageFormat: no way to control fractional digits in percent and currency format

Description

MessageFormat is pretty handy when dealing with complex messages with date, number, percent, plural, etc.

1 The tank was {0,number,percent} full at {1,time,short}

When formatting percentage, it'd be great if I could control the number of digits (integer portion and fraction portion) as I can do with just 'number formatter'.

1 {0, number,##.###%}

does not work because '%' is literally interpreted. In some locales, there should be a space before '%' sign, but with the above, I don't get that right.

Obviously, the percentage portion can be formatted separately and inserted into a string.

However, it'd be handy if a message format can be extended to allow the control of # of digits. Below are two possible ways to extend message format.

1 {0,number,percent,##.#}

or

1 {0,percent,##.#}

A similar approach may be taken for the currency.

Environment

Status

Assignee

googler@icu-project.org

Reporter

Jungshik Shin (신정식)

Labels

tracCc

markus

tracCreated

May 17, 2016, 11:48 PM

tracOwner

googler

tracProject

all

tracReporter

jungshik

tracStatus

design

Components

Priority

assess