-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compound units like square-* or cubic-* #767
Comments
Is this data already available in CLDR? |
I based those lists on https://github.com/unicode-org/cldr/blob/main/common/validity/unit.xml |
@hlehmann perfect, so the data exists and there's demand! I would raise this in the TC39-TG2 meeting later today but generally, anything you could do to make a stronger case for the addition of these units would be wonderful. This includes (but isn't limited to) other standard libraries/popular packages supporting the use of these units, use of the units on the web in the wild, especially in contexts that utilize or could potentially benefit from localization. I think the use-cases for square-meter for example would be fairly easy to spot in real-estate related web applications (for example). |
Thanks. My main concern is mostly about square-meter and square-kilometer (and imperial units equivalents). Any apps that have for example:
By searching m² or km² on the web it returns hundreds of millions page results. |
Arbitrary unit dimensionality should be implementable with ICU with minimal data size impact. |
@ryzokuken, our app showcases event venues, including their floor plans and event space measurements. We'd really love to have support for square feet and square meters for those use cases. We're currently localizing our app, and we're having to implement this ourselves. |
Sounds like an |
As I undersand there were and issue of data size, that's why allowed units have been limited.
Currently there a list of allowed unit identifiers and a possibility to combine them by using the identifier
-per-
(ex: meter-per-second => m/s).Could it be possible to add the same logic with "square-" and "cubic-" (ex squared-meter => m² or meter-per-squared-second => m/s²).
This would allow use of area units and volume units:
If a generic "square-" approach is not possible, please consider adding some of square area units as there are commonly used.
The text was updated successfully, but these errors were encountered: