私はMVC5のアプリケーションを持っており、いつも完璧に動作しました!今私は新しいaspnetcore mvc 6を使用して新しいアプリを開始し、私は仕事にアクセントを置くことができませんでした。Accentuationが機能していませんAspnet Core
私はここに同じ問題を抱えた投稿を見つけましたが、私は答えとして正確に行いましたが、うまくいきませんでした。
EDIT:<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">
任意の手掛かり?