I\'m having some odd issues with a web application written using Asp.Net Core 1.1, using the full .Net Framework v4.6.2.
I want to force the application to use a swedish
I had a similar issue with ASP Net Core 3.0. The site hosting was in a different country causing issues with formats.
I added the following to the startup:
using Microsoft.AspNetCore.Localization;
using System.Globalization;
in ConfigureServices:
services.AddLocalization();
in Configure:
var supportedCultures = new[]{
new CultureInfo("en-US")
};
app.UseRequestLocalization(new RequestLocalizationOptions {
DefaultRequestCulture = new RequestCulture("en-US"),
SupportedCultures = supportedCultures,
FallBackToParentCultures= false
});
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("en-US");