Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display attribute with localization
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
MVC
Title:
Display attribute with localization
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01617665
Message ID:
01617665
Views:
32
Hi everybody,

We have this problem. We have several resource files with localized strings. Some of them allow parameters, say, we have
userDefinedX	User-Defined {0}
So, we want to have a display name attribute that will read 'User-Defined 1'.

Right now the solution my colleague implemented was to create new labels for 1 and 2 and use
[Display(Name = "userDefined1", ResourceType = typeof(Labels))]
Do you think there is any solution available that would not require creating extra labels? E.g. we need to somehow be able to use the String.Format here.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform