I'm trying to force my localization to Swedish (sv-SE). Everything is working locally, but after deploying to Azure the validation errors always show in English.
This is my configuration in Startup.cs.
public void ConfigureServices(IServiceCollection services)
{
...
services.AddLocalization();
...
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerfactory)
...
RequestLocalizationOptions localizationOptions = new RequestLocalizationOptions
{
SupportedCultures = new List<CultureInfo> { new CultureInfo("sv-SE") },
SupportedUICultures = new List<CultureInfo> { new CultureInfo("sv-SE") }
};
app.UseRequestLocalization(localizationOptions, new RequestCulture("sv-SE"));
...
}
When rendering the view I can see that the UI-Culture and Culture is correctly set to sv-SE both locally and on Azure.
Do I have to include something when publishing to Azure, a localization resource or something?
I'm using the latest version of ASP.NET Core (RC1).