Skip to content

Commit f8f718c

Browse files
authored
Merge pull request #536 from MerginMaps/currency-locale-accept
Accept locale for currency calculation
2 parents 88885a3 + 0958fe7 commit f8f718c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web-app/packages/lib/src/common/number_utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ export function formatFileSize(
3939
export function formatToCurrency(
4040
value: number,
4141
currency: string,
42-
digits = 2
42+
digits = 2,
43+
locale = 'en-UK'
4344
): string {
44-
return value.toLocaleString('en-UK', {
45+
return value.toLocaleString(locale, {
4546
style: 'currency',
4647
currency,
4748
currencySign: 'accounting',

0 commit comments

Comments
 (0)