ASP.NET - MVC 3: Localization

前端 未结 2 904
梦如初夏
梦如初夏 2020-12-12 22:48

I am about to implement localization for my MVC3 web application. Googling my way through large amounts of ways to do it, I was left unsure which way to implement this. I fo

2条回答
  •  攒了一身酷
    2020-12-12 22:53

    Then I found a post that warned about using the App_GlobalResouces and App_LocalResources. (Link)

    I found that post extremely useful. The method explained there is very clean. Here is a snippet of my newly created index view using that method:

    @using Resources.Index
    @{
        ViewBag.Title = "Index";
    }
    
    

    @Index.Title

    I don't think there is a definitive do-it-this-way-or-else method, so going for the cleanest method seems to me like a good deal.

提交回复
热议问题