Question

I have the following Solution:

  1. SomeProject.Ria (non Silverlight code)
  2. SomeProject.Ria.Silverlight (Silverlight light code, namespace is still SomeProject.Ria)
  3. SomeProject.Ria.MyServices (RIA Services Domain Service)
  4. SomeProject.Ria.MyServices.Proxies (RIA Services Silverlight Generated Code)
  5. SomeProject.Shell (Silverlight Applicaiton)
  6. SomeProject.Web (Web Application)

I would like to use Resource Files for my Annotations on the meta data class in SomeProject.Ria.MyServices.

The format for that appears to be:

[Required(AllowEmptyStrings=false,ErrorMessageResourceName="ThisFieldIsRequired", ErrorMessageResourceType(MyResource))]     

Which project does MyResource belong in? (Assuming that someday I need to support other culture files).

Also the use of the string in here really seems to breed room for error, is it possible to do something like this and still achieve localization, or does this just get compiled into the meta data? If not, how can I get round the resource name being a string?

[Required(AllowEmptyStrings=false,ErrorMessage=MyResources.RequiredMessage)]            
Was it helpful?

Solution

I was directed to a very recent post from Brad Abrams that outlines what I needed to know:

http://blogs.msdn.com/brada/archive/2010/03/22/silverlight-4-ria-services-ready-for-business-localizing-business-application.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top