Looking to create a JavaScript string without relying on C# calls
Formatter = @$"function(value, opts) {{ if (value === undefined) {{return '';}} return Intl.NumberFormat('{CultureInfo.CurrentCulture.Name}', {{ style: 'currency', currency: '{RegionInfo.CurrentRegion.ISOCurrencySymbol}' }} ).format(value);}}" } };
Although this method works, I believe there is probably a way to achieve the same result without using C#.
Essentially, my question is whether there is a way in JavaScript to format an integer as a currency value (e.g. 2567 -> £2567.00) based on the browser's current Culture/Locale settings. Most examples I have come across for Intl.NumberFormat require specifying the Culture/Locale/Currency to be used.