-2
我有一個appication MVC5和everthing工作完美!現在即時啓動一個新的應用程序使用新的aspnetcore mvc 6,我不能讓重音工作。Accentuation不工作Aspnet核心
我在這裏發現了一個帖子,提出了同樣的問題,我做了完全一樣的答案,但沒有奏效。
編輯:<system.web> globalization in .net core
我的代碼:
public void ConfigureServices(IServiceCollection services)
{
//Setting Culture
services.AddLocalization(options => options.ResourcesPath = "Resources");
services.AddMvc().AddViewLocalization().AddDataAnnotationsLocalization();
//services.AddScoped<LanguageActionFilter>();
services.Configure<RequestLocalizationOptions>(
options =>
{
var supportedCultures = new List<CultureInfo>
{
new CultureInfo("pt-BR")
};
options.DefaultRequestCulture = new RequestCulture(culture: "pt-BR", uiCulture: "pt-BR");
options.SupportedCultures = supportedCultures;
options.SupportedUICultures = supportedCultures;
});
在我的頁面佈局就是這樣:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CRM Online</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
任何線索?