petabridge / DrawTogether.NET

Apache License 2.0
53 stars 10 forks source link

Culture related formatting for decimal numbers #11

Closed KristofferStrube closed 3 years ago

KristofferStrube commented 3 years ago

Many countries in the world have other decimal separators than the dot sign like a comma in most of Europe, South America, and some of Africa. SVG elements expect decimal numbers with a dot separator, but when running the application the local CultureInfo is used, so it will use a comma instead, for some. To fix this globally for your Blazor Wasm project, you can add the following to that project file:

<PropertyGroup>
  <InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
Aaronontheweb commented 3 years ago

Good idea