Posts
114
Comments
126
Trackbacks
10
localization
There are 4 entries for the tag localization
Extending MvcContrib grid with custom DataAnnotationsModelMetadataProvider
Technorati Tags: .NET,ASP.NET,ASP.NET MVC,MvcContrib,localization In a prior post, I blogged about creating a custom class inheriting from System.Web.Mvc.DataAnnotati... to provide localized display names for my models. I was disappointed to find that the MvcContrib grid doesn't use the metadata provider for column names - it just splits "Pascal-case" property names into words (e.g. "FromDate" to "From Date") if a name hasn't been explicitly assigned. public string DisplayName ......
Posted On Tuesday, July 6, 2010 9:44 PM | Comments (5)
ASP.NET MVC localization DisplayNameAttribute alternatives: a better way
Technorati Tags: ASP.NET,ASP.NET MVC,localization In my last post, I talked bout creating a custom class inheriting from System.ComponentModel.Displ... to retrieve display names from resource files: [LocalizedDisplayName("Reme... public bool RememberMe { get; set; } That’s a lot of work to put an attribute on all of my model properties though. It would be nice if I could intercept the ASP.NET MVC code that analyzes the model metadata to retrieve display names to make it automatically ......
Posted On Monday, June 14, 2010 6:04 PM | Comments (6)
ASP.NET MVC localization DisplayNameAttribute alternatives: a good way
Technorati Tags: ASP.NET,ASP.NET MVC,localization The ASP.NET MVC HTML helper methods like .LabelFor and .EditorFor use model metadata to autogenerate labels for model properties. By default it uses the property name for the label text, but if that’s not appropriate, you can use a DisplayName attribute to specify the desired label text: [DisplayName("Remember me?")] public bool RememberMe { get; set; } I’m working on a multi-language web site, so the labels need to be localized. I tried pointing ......
Posted On Monday, June 14, 2010 5:26 PM | Comments (1)
ASP.NET Localization: Enabling resource expressions with an external resource assembly
Technorati Tags: .NET,ASP.NET,localization I have several related projects that need the same localized text, so my global resources files are in a shared assembly that’s referenced by each of those projects. It took an embarrassingly long time to figure out how to have my .resx files generate “public” properties instead of “internal” so I could have a shared resources assembly (apparently it was pretty tricky pre-VS2008, and my “googling” bogged me down some out-of-date instructions). It’s easy ......
Posted On Saturday, June 5, 2010 5:15 PM | Comments (3)
Tag Cloud