Need BCP 47 equivalent of ucol_getKeywordValuesForLocale

Description

The function ucol_getKeywordValuesForLocale returns an enumeration of old-style keyword values, which may or may not be valid as BCP 47 subtags. This forces clients that are based on BCP 47 to have mapping tables to map the old-style values to equivalent BCP 47 subtag values, and check for each ICU release whether new values have been added and require updates to the tables.

A parallel function that returned BCP 47 subtag values would avoid this maintenance burden.

Activity

Show:
TracBot
June 30, 2018, 11:24 PM
Trac Comment 4.6 by —2014-09-03T19:51:48.096Z

Replying to (Comment 4 yoshito):

It is desired to have generic APIs for following:

 

  • Map between BCP 47 u extension and legacy keys/types

This is done by #8951 in ICU 54. All necessary key/type data are now imported to ICU internally. I'll look into the rest of APIs for ICU 55.

TracBot
June 30, 2018, 11:24 PM
Trac Comment 4 by —2013-08-16T18:37:04.220Z

It is desired to have generic APIs for following:

  • Map between BCP 47 u extension and legacy keys/types

  • Returns a list of defined keys/types

  • Returns a list of effective keys/types by each service

For now, CLDR has full BCP 47 u extension key/type data, but not all of them are imported into ICU. Also, we use resource bundle to store these data which causes cyclic dependency between locale code and resource bundle code. I proposed to store key/type information in tool generated C/Java source file, instead of resource bundle and import full information. This is discussed in the ICU PMC on 2013-08-14 and we agreed on this change. It is too late to make this change for ICU 52, because CLDR 24 is about to freeze. I'm going to work on this soon after CLDR 25 development is started, and come up with a series of APIs dealing with above requirements.

TracBot
June 30, 2018, 11:24 PM
Trac Comment 3 by —2013-02-14T22:52:42.539Z

We need some design work for this. I'll schedule this for ICU 52.

TracBot
June 30, 2018, 11:24 PM
Trac Comment 1 by —2012-10-05T01:23:25.590Z

The same problem exists for ucal_getType and ucal_getKeywordValuesForLocale.

Assignee

Yoshito Umaoka

Reporter

icu@lindenbergsoftware.com

Components

Labels

None

Reviewer

None

Priority

major

Time Needed

None

Fix versions