diff --git a/app/frontend/src/components/forms/ConfigForm.svelte b/app/frontend/src/components/forms/ConfigForm.svelte index 80ec3e4b..17e4799e 100644 --- a/app/frontend/src/components/forms/ConfigForm.svelte +++ b/app/frontend/src/components/forms/ConfigForm.svelte @@ -12,23 +12,21 @@ }); import { config, type Config } from '$lib/stores/config'; + import { listCurrencies } from '$lib/utils/currencies'; let localConfig: Config[] = $state([]); + const userLocale = navigator.language || 'en'; + + const currencyOptions = listCurrencies(userLocale); + const dateFormatOptions = [ { value: 'dd/MM/yyyy', label: 'dd/MM/yyyy (e.g., 31/12/2000)' }, { value: 'MM/dd/yyyy', label: 'MM/dd/yyyy (e.g., 12/25/2000)' }, { value: 'yyyy-MM-dd', label: 'yyyy-MM-dd (e.g., 2000-12-31)' }, { value: 'dd MMM, yyyy', label: 'dd MMM, yyyy (e.g., 31 Dec, 2000)' } ]; - - const currencyOptions = [ - { value: 'INR', label: 'INR (₹)' }, - { value: 'USD', label: 'USD ($)' }, - { value: 'EUR', label: 'EUR (€)' }, - { value: 'GBP', label: 'GBP (£)' } - ]; - + const uomOptions = [ { value: 'metric', label: 'Metric' }, { value: 'imperial', label: 'Imperial' } @@ -76,15 +74,15 @@ {/each} {:else if item.key === 'currency'} - + {:else if item.key === 'unitOfMeasure'}