Skip to content

Localization String Formatting for Units #12

@stiefeljackal

Description

@stiefeljackal

With the current formatting implementation, it is currently only possible to produce an English (US) translated string for a given unit (e.g., 200 meters, 1000 grams, 30 days, etc.). There is currently no way to produce localization strings for other languages besides English (US).

In order to support other locales, there should be a feature in place that allows one to register a unit string formatter that can provide the formatted string of a given unit. If the library offers a way to register a unit string formatter, it can provide a more flexible option for formatting a unit's string name than the current implementation.

For the case of Resonite, the unit string formatting logic for different Locales can be handled outside of Elements.Quantity as long as the unit string formatter delegate is registered on Resonite's end.

I do have something that I am working that will offer this functionality, but I will wait until the review of #11 is completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions