MessageFormat class provide method to get argument names

Description

Deleted Component: formatting

It would be very helpful to have a method to retrieve the names of the arguments in a given message. This allows for creating the Map of arguments and values more easily. It also allows for creating reusable components that may not know in advance what the argument names are.

Activity

Show:
TracBot
June 30, 2018, 11:30 PM
Trac Comment 2 by —2011-04-08T19:18:35.503Z

It looks like we have this at least in progress.

ICU4J MessageFormat has getFormatArgumentNames() and getFormatByArgumentName() but I am surprised to see that they are @internal. I will look into this.

ICU4C MessageFormat has getFormatNames() and getFormat(name) which are @stable ICU 4.0.

ICU 4.8 will add the MessagePattern class which provides access to all of the syntax elements in a MessageFormat, including the argument names.

TracBot
June 30, 2018, 11:31 PM
Trac Comment 3 by —2011-04-23T00:04:59.537Z

I just proposed the Java API.

TracBot
June 30, 2018, 11:31 PM
Trac Comment 4 by —2011-04-28T17:07:34.572Z

Mark, please review the now-public Java API. C++ did not need any changes, see comments above.

TracBot
June 30, 2018, 11:31 PM
Trac Comment 6 by —2016-10-05T23:13:19.237Z

Milestone 4.8RC deleted

Fixed

Assignee

Markus Scherer

Reporter

TracBot

Components

None

Labels

None

Reviewer

None

Priority

minor

Time Needed

Hours

Fix versions