BlogsShopifyLocale-aware Number and Currency Condensing

Locale-aware Number and Currency Condensing

Locale-aware Number and Currency Condensing

1
posts
2018

This feature thread tracks the development and enhancement of Shopify's capabilities for locale-aware number and currency condensing. Initial efforts focused on addressing the challenges of displaying long numbers in graphs within the Shopify admin across multiple languages. The solution involved leveraging Unicode CLDR data and Intl.js to create a library that abbreviates numbers and currencies according to the user's locale, ensuring consistent design and improved readability for merchants worldwide. The library was open-sourced as the `@shopify/condense-number` npm package.

2018

Creating Locale-aware Number and Currency Condensing - Shopify

10/24/2018

This post details the development of a new library, `@shopify/condense-number`, to handle locale-aware number and currency condensing. It describes the problem of long numbers in graphs for multilingual Shopify admin interfaces, the lack of suitable existing JavaScript solutions, and the decision to leverage Unicode CLDR and Intl.js data. The post highlights the use of Hack Days for development and the subsequent open-sourcing of the library.