User-209105085 posted
I’m validating my WCF request object’s parameter using DataAnnotation. This is working fine and no problems there.
I want to store my error messages into resx file. According to my understanding the default resource provider will use the Current thread’s UI culture to determine which resource string to retrieve.
Do I need to name the .resx file in certain way so that resource provider will know which file to use for particular culture? If yes, what is the naming convention?
For example, if you see the code below ErrorMessageResourceType is set to ServiceResourceStrings which is the class created by .Net for .resx file, now if I have one more .resx file for different language say “es-MX”, then it will have different
class name. I don’t see the .resx file itself stored any culture code
[Required(ErrorMessageResourceName = "NameRequired", ErrorMessageResourceType = typeof(ServiceResourceStrings))]
[DataMember]
public string Name
{
get;
set;
}