Fix culture
This commit is contained in:
parent
6f5439d1b9
commit
d0624f8b26
|
@ -1,5 +1,7 @@
|
|||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using AfRApay.Web.Backend.Database;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Swashbuckle.AspNetCore.Filters;
|
||||
|
||||
|
@ -23,6 +25,13 @@ builder.Services.AddControllers();
|
|||
|
||||
var app = builder.Build();
|
||||
|
||||
var culture = new CultureInfo("de-DE") { NumberFormat = { NumberDecimalSeparator = ".", CurrencyDecimalSeparator = "." } };
|
||||
|
||||
app.UseRequestLocalization(options => {
|
||||
options.DefaultRequestCulture = new RequestCulture(culture);
|
||||
options.SupportedCultures = new List<CultureInfo> { culture };
|
||||
});
|
||||
|
||||
if (app.Environment.IsDevelopment()) {
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
|
|
Loading…
Reference in a new issue