Force locale with Asp.Net Core

前端 未结 3 2169
不知归路
不知归路 2021-02-10 01:17

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

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-10 01:55

    Did you try setting the CultureInfo.CurrentCulture property in Program.cs:

    using System.Globalization;
    
    CultureInfo.CurrentCulture = new CultureInfo("sv-SE");
    

提交回复
热议问题