Skip to content

ICU4X objects that try_new with a provider should store and expose the resolved locale #3906

Open
@hsivonen

Description

@hsivonen

ECMA-402 requires various objects to be able to expose the resolved options. Common across different types is the resolved locale.

For ECMA-402 compat, we should make various ICU4X objects call take_metadata_and_payload instead of take_payload when loading their primary provider-backed payload and store the DataLocale from the metadata. We should then have a convention across ICU4X for retrieving that Locale from the ICU4X object.

The finer points of DataLocale vs. Locale are unclear to me, so I'm not sure if the convention should be fn resolved_locale(&self) -> &DataLocale allowing the application to call .into_locale() or fn resolved_locale(&self) -> Locale.

Metadata

Metadata

Assignees

Labels

C-collatorComponent: Collation, normalizationU-ecma402User: ECMA-402 compatibilitydiscussDiscuss at a future ICU4X-SC meeting

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions