Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Currency culture formatting nl-NL/BE gives uncorrect format

$
0
0

I'm trying to write a currency in the Dutch format:€1.000,00

meaning:
Euro sign before the amount
Between thousands a dot
Between cents a comma

However when I use CultureInfo "nl-NL" or "nl-BE" it shows: €1,000.00 which is not correct

PrijsDisplay.razor and code behind razor.cs

@using System.Globalization<span>@Prijs.ToString("C", new CultureInfo("nl-NL"))</span>@code {}using Microsoft.AspNetCore.Components;public partial class PrijsDisplay : ComponentBase{    [Parameter]    public required decimal Prijs { get; set; }}

Blazorpage.blazor

<PrijsDisplay Prijs="101099" />

Actual Output:€101,099.00

Expected output:€101.099,00

Why does it do this?

I tried various other CultureInfo's, but only the Dutch and Belgians use this format, all other European countries I tried either used . for cents and , for thousands or put the euro sign after the amount


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>