From 33bb381035425ec1a5b832d3dd5cde7e50ae81df Mon Sep 17 00:00:00 2001 From: thecashewtrader Date: Thu, 3 Nov 2022 22:13:41 +0530 Subject: [PATCH] Make numberFormat respect language and region settings --- src/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 66bbb0eb..74aaa31b 100644 --- a/src/main.js +++ b/src/main.js @@ -88,7 +88,12 @@ const mixin = { return str; }, numberFormat(num) { - const formatter = Intl.NumberFormat(undefined, { notation: "compact" }); + const formatter = Intl.NumberFormat( + `${this.getPreferenceString("hl")}-${this.getPreferenceString("region")}`, + { + notation: "compact", + }, + ); return formatter.format(num); }, addCommas(num) {