Open alpennec opened 5 months ago
It's currently impossible to extend localization support to custom Dimension
, unfortunately. Currently we rely exclusively on ICU to fetch the localization. I imagine we'd need to add a hook in Measurement.FormatStyle
to take localization via, say, our string localization infrastructure. Such "hook" will probably be public to allow extension in your own type, which means new API as well.
I've defined a custom Dimension to represent the pace.
I want to format a
Measurement<UnitPace>
so it can be shown in the UI.How can I specify the localised strings for the different
UnitStyle
(short, medium, long) /UnitWidth
(wide, abbreviated, narrow) to use?