Skip to main content

icu_locale_core/preferences/extensions/unicode/keywords/
measurement_system.rs

1// This file is part of ICU4X. For terms of use, please see the file
2// called LICENSE at the top level of the ICU4X source tree
3// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5use crate::preferences::extensions::unicode::enum_keyword;
6
7enum_keyword!(
8    /// A Unicode Measurement System Identifier defines a preferred measurement system.
9    ///
10    /// Specifying "ms" in a locale identifier overrides the default value specified by supplemental measurement system data for the region
11    ///
12    /// The valid values are listed in [LDML](https://unicode.org/reports/tr35/#UnicodeMeasurementSystemIdentifier).
13    MeasurementSystem {
14        /// Metric System
15        ("metric" => Metric),
16        /// US System of measurement: feet, pints, etc.; pints are 16oz
17        ("ussystem" => USSystem),
18        /// UK System of measurement: feet, pints, etc.; pints are 20oz
19        ("uksystem" => UKSystem)
20}, "ms");