aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Numpad.svelte6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte
index 4f04fbaa..5ba6e244 100644
--- a/src/components/Numpad.svelte
+++ b/src/components/Numpad.svelte
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from "svelte";
import Left from "$comp/Left.svelte";
- import { f, s, focus, warning, sat, sats } from "$lib/utils";
+ import { f, s, focus, warning, sat, sats, localeMap } from "$lib/utils";
import { t } from "$lib/translations";
import { fiat as fiatStore } from "$lib/store";
@@ -26,8 +26,8 @@
let symbol = $state("");
let position = $state("before");
- function getCurrencyInfo(locale: any = "en-US", currency: string) {
- const l = typeof locale === "function" ? locale() : locale || "en-US";
+ function getCurrencyInfo(locale: any = "", currency: string) {
+ const l = typeof locale === "function" ? locale() : locale || localeMap[currency] || "en-US";
const region = l.length >= 2 ? l.slice(-2) : "";
const currencyDisplay = region && currency.startsWith(region) ? "narrowSymbol" : "symbol";
const formatter = new Intl.NumberFormat(l, {