I have a main asp.net application that I want to localize and translate (v 1.1.0). I want the source code to support both English and Norwegian deployments, and I found that it could be startup.cs configuration
RequestLocalizationOptions localizationOptions = new RequestLocalizationOptions
{
SupportedCultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("nb-NO") },
SupportedUICultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("nb-NO") },
DefaultRequestCulture = new RequestCulture("nb-NO")
};
app.UseRequestLocalization(localizationOptions);
However, I want to have only one culture and one ui culture for each deployment, so I was hoping to find a way to set the culture and ui culture in the appsettings.json or enviroment variables. Is it possible?
source
share