Cldr Units version 3.5.0-rc.1
Pre-releaseOverview
In this release the Cldr.Unit.to_string/{1, 2, 3}
function has been rewritten and the concrete impementation is now in Cldr.Unit.Format
. The primary reasons for rewriting are:
- Improves performance by 20% over the old implementation.
- Supports grammatical case and grammatical gender. These allow for better sentence formation in a localised fashion. Only are few locales have the required data for now (for example,
fr
andde
) however more locales will have data in upcoming CLDR releases.
Note that full testing of grammatical case and grammatical gender variations is not yet complete.
Soft Deprecation
-
The function
Cldr.Unit.to_iolist/{1, 2, 3}
is soft deprecated. It is still available and no deprecation warning is emitted. It will however be removed from the public API in a future release. This function is primarily used to support implementation ofCldr.Unit.to_string/3
-
As of this release, argument checking in
Cldr.Unit.to_iolist/3
is less rigorous in order to avoid the relatively expensive argument normalization process happening twice (once inCldr.Unit.to_string/3
and then again inCldr.Unit.to_iolist/3
).
Bug Fixes
- The new string formatter correctly assembles units with an SI prefix (ie
millimeter
) in languages such as German where the noun is capitalized.