Add support for formal currencies and other currency formats

Description

CLDR has data such as:

CLDR is also working on adding a "local" alternative ().

There should be ICU APIs to allow users to use these symbols. This should mostly be a matter of adding entries to the enums in C++ and Java. Might be blocked in ICU4C by ICU-13297.

http://b/139717059

Activity

Show:
Shane Carr
November 2, 2019, 5:49 PM

One issue here with API design is that clients seem to frequently prefer to opt in to the variants for certain currencies but not others. For example, a client might want the formal variant "NT$" for TWD in zh-TW, but the standard variant in all other currencies and locales.

If we just add to the enum, that's the easiest for us, but then it makes people do code like,

which would work but is not necessarily the best i18n practice, since it makes client code dependent on the form of CLDR data.

Also see about designing an API for currency symbol overrides in NumberFormatter.

Assignee

Shane Carr

Reporter

Shane Carr

Components

Labels

Reviewer

None

Priority

major

Time Needed

Days

Fix versions

Configure